Created
May 9, 2013 11:41
-
-
Save jipiboily/5546981 to your computer and use it in GitHub Desktop.
Migration for a model that does not exist in the app
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
class MyMigrationForSomething < ActiveRecord::Migration | |
class Monologue::PostsRevision < ActiveRecord::Base | |
end | |
def up | |
Monologue::PostsRevision.reset_column_information # This might not be necessary, but you know it exists if needed! :) | |
# do your stuff here... | |
end | |
def down | |
Monologue::PostsRevision.reset_column_information | |
end | |
# or, depending on what your migration does, just this 'change' method instead of both 'up' and 'down' methods | |
def change | |
Monologue::PostsRevision.reset_column_information | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment