This gem generates ActiveRecord Migration files from a DB Designer 4 xml file.
- activerecord
$ sudo gem sources -a http://gems.github.com (you only have to do this once)
$ sudo gem install rafaelp-dbdesigner_generators
Save you model in db/dbdesigner_model.xml, then run:
$ ruby script/generate dbdesigner_migration [MigrationName] [only|except] [table1] [table2] [table3]
$ ruby script/generate dbdesigner_migration CompleteDatabase
$ ruby script/generate dbdesigner_migration CreateAccountsAndUsers only accounts users
$ ruby script/generate dbdesigner_migration CreateOtherTables except accounts users
You can put the magical keyword ignore on first line of table comments, on your model at DB Designer, to automatically ignore the table on migration generation.
DBDesigner Generators is released under the MIT License.
Working at BielSystems and Myfreecomm
Blog: http://rafael.adm.br
Podcast: http://rafael.adm.br/voltandopracasa
Github: https://github.com/rafaelp
Twitter: http://twitter.com/rafaelp