Fork me on GitHub

simple-db-migrate by Guilherme Chapiewski

simple-db-migrate is a database versioning and migration tool inspired on Rails Migrations.

This tool helps you manage and track your database schema changes.

The main difference between Rails migrations and this tool is that Rails migrations are intended to be used on Ruby projects while simple-db-migrate's goal is to provide database migrations for any kind of project written in any language.

This is possible because simple-db-migrate uses database's DDL (Data Definition Language) to do the database operations, while Rails Migrations are written in a Ruby DSL.

For now, simple-db-migrate only works with MySQL databases, but it will support other databases in a near future. Come back to check soon. You can also follow the project roadmap and changes at Lighthouse.

Download and Install

The current production version is v1.3.8. The simplest way to install is using easy_install:

$ sudo easy_install simple-db-migrate
Or, if you already have an older version installed, use the "--upgrade" option:
$ sudo easy_install --upgrade simple-db-migrate

If you want to use the development version or older versions, you can install directly from the source code. To do this, clone the project with Git by running:

$ git clone git://github.com/guilhermechapiewski/simple-db-migrate

You can also download the source code in either zip or tar formats.

After downloading, to install from the source simply run:

$ sudo python setup.py install

Dependencies

simple-db-migrate depends on database drivers to execute the migrations:

Currently the only database supported is MySQL and MS SQL Server support is under test and will be added in the next release. There are plans to add support for Oracle and PostgreSQL.

Install simple-db-migrate on Windows

1) Install Python

1.1) Go to the Python 2.5.4 release page and download Python installer (if you are not sure about the installer you'll need, use http://python.org/ftp/python/2.5.4/python-2.5.4.msi).

1.2) Install Python. If you are not sure about what to do, follow these instructions:

2) Install setuptools

2.1) Go to the setuptools 0.6c9 page and download setuptools installer (if you are not sure about the installer you'll need, use http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9.win32-py2.5.exe#md5=602d06054ec1165e995ae54ac30884d7).

2.2) Install setuptools (Next, Next, ..., Finish)

3) Configure Python and setuptools ENV variables 4) Install MySQL-Python

4.1) Go to the MySQL-Python project page and download the release 1.2.2 installer (http://ufpr.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.2.win32-py2.5.exe).

4.2) Install MySQL-Python (Next, Next, ..., Finish)

5) Install simple-db-migrate You are done! Type "db-migrate -v" at the command prompt and you should see the installed version number (v1.3.8).

Usage instructions

For usage instructions check the "README.textile" file and the "example" directory (more specifically the simple-db-migrate.conf file) on the project root to see how your migrations will be like. For usage instructions you can type on your shell:

$ db-migrate --help

We'll have more detailed instructions soon along with version v1.4.0 (which will be released very soon) :)

Report bugs and request features

You can report bugs and request new features through the project's issue tracking system at Lighthouse.

You can also get in touch through the mailing list at Google Groups (simple-db-migrate at googlegroups dot com).

Contributors

Many thanks to the following contributors and their valuable patches!

Developement

simple-db-migrate is an open-source project developed by Guilherme Chapiewski under Apache License 2.0. It is developed entirely in Python 2.5 using Ubuntu+Gedit or Mac OS X+Textmate (depending on the developer's mood).