code_junkie

How do I create the migrations for a legacy database?

Nov 11th, 2011
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. class CreateTables < ActiveRecord::Migration
  2. def self.up
  3. `cp #{RAILS_ROOT}/db/schema_base.rb #{RAILS_ROOT}/db/schema.rb`
  4. Rake::Task['db:schema:load'].invoke
  5. end
  6.  
  7. def self.down
  8. end
  9. end
Add Comment
Please, Sign In to add comment