Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

sbisbee/sql2couchdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql2couchdb
===========

Version: PROOF OF CONCEPT 

At the moment this project is a proof of concept, meaning it has poor code
design, no architectural thought, a lot of duct tape and hacks, but still
functions. The eventual program will look little like it does now.

The idea is that you feed it a JSON object that has an SQL SELECT statement and
the JSON that you want your documents to look like. The values of your
document's properties map to the column headers that you SELECT from your
tables.

This allows you to easily migrate data stored in SQL to CouchDB JSON documents.

Currently only MySQL is supported, but support for other SQL stores is planned.

Compatability
-------------

PHP 5 (requires MySQL libraries)

Running It
----------

sql2couchdb takes all of the connection info on the command line, with the last
argument being the path to the JSON file. For example,
 
./sql2couchdb.php --mysql-user=john --mysql-pass=l337 --mysql-db=s2c --couchdb-db=s2c example.json

Host and port information defaults to 127.0.0.1 and the server's default port.
CouchDB does not require authentication information unless your database
requires an account to write.

See example.json for an example of how to format your JSON file.

About

Translates data in SQL based storage to CouchDB documents.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages