I'm using ActiveRecord outside Rails. I would want a program to generate the skeleton of a migration ( as well as a system to collect and maintain them ).
Can anyone make a suggestion?
There is another gem called otr-activerecord. This gem provides following tasks:
rake db:createrake db:create_migration[name]rake db:droprake db:environment:setrake db:fixtures:loadrake db:migraterake db:migrate:statusrake db:rollbackrake db:schema:cache:clearrake db:schema:cache:dumprake db:schema:dumprake db:schema:loadrake db:seedrake db:setuprake db:structure:dumprake db:structure:loadrake db:versionAll you need to do is to install it and add a Rakefile with content
load 'tasks/otr-activerecord.rake'
OTR::ActiveRecord.configure_from_file! 'config/database.yml'
I prefer this gem over active_record_migrations or Standalone Migration because those two gems depend on railties, which is almost the entire Rails. For example, Nokogiri takes a long time to compile, and takes a lot of spaces.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With