BETTER DATABASE CHANGES
DBGeni helps you organise and apply changes to your database. If you follow a few opinionated rules, dbgeni knows where to find your migrations scripts, the order to run them and what still needs to be applied.
Currently supports Sqlite, MySQL, Oracle and Sybase, with more databases planned soon.
Download the latest version (0.10.0)
- Build your database with a single command
- Uses plain SQL files - no new syntax or lockin
- Supports stored procedures
- Easily apply changes to many environments
- Simple command line interface but scriptable, if you need it
DBGeni requires Ruby and Rubygems.
At runtime, database drivers are required too:
- For Oracle ensure you have a working sqlplus and install oci8
- For MySQL ensure you have a working mysql command and install the ruby-mysql gem
- For Sqlite, ensure the sqlite3 command line shell works and install the sqlite3 gem
- For Sybase you require isql, jruby and a few other modules. Refer to the manual
Download dbgeni-0.10.0.gem and install it locally:
$ wget http://dbgeni.com/downloads/dbgeni-0.10.0.gem $ gem install dbgeni-0.10.0.gem
At the moment dbgeni is not on Rubygems.
Create a new project
By default, dbgeni uses a new SQLite database, so it is easy to experiment.
$ dbgeni new /path/to/project
Initialize the database
$ cd /path/to/project $ dbgeni initialize
Create a migration
$ dbgeni generate migration my_first_migration
$ dbgeni migrations apply all
Apply Stored Procedures
$ dbgeni code apply all
Have a look at the overview and the manual to learn how DBGeni works and all the other features.