Created
November 20, 2012 08:10
-
-
Save cantin/4116680 to your computer and use it in GitHub Desktop.
dump sql and reload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> DB_STRUCTURE=db/null_schema.sql rake db:structure:dump | |
class NullMigration < ActiveRecord::Migration | |
def up | |
file_data = File.read('db/migrate/null_schema.sql') | |
ActiveRecord::Base.connection.execute file_data | |
end | |
def down | |
raise ActiveRecord::IrreversibleMigration | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment