Ruby / Rails - Reverse Migration - DDL for Ruby Code

Any tools in Ruby or Rails that will allow me to fetch the entire table schema from the database and generate Ruby equivalent "DLL" expressions?

Something that would allow me to port my schema from Microsoft SQL Server to Postgres or MySQL to Sqlite.

+2
ruby ruby-on-rails migration ddl


source to share


1 answer


In Rails / ActiveRecord you can use rake db:schema:dump

to generate db / schema.rb and rake db:schema:load

to load into database.



+4


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics