Skip to content

Instantly share code, notes, and snippets.

@jipiboily
Created May 9, 2013 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jipiboily/5546981 to your computer and use it in GitHub Desktop.
Save jipiboily/5546981 to your computer and use it in GitHub Desktop.
Migration for a model that does not exist in the app
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