Skip to content

Instantly share code, notes, and snippets.

@kazpsp
Last active December 21, 2015 01:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazpsp/6226710 to your computer and use it in GitHub Desktop.
Save kazpsp/6226710 to your computer and use it in GitHub Desktop.
class Fixtables < ActiveRecord::Migration
def self.up
change_column :table_name, :column_name, :newtype
change_column :table_name, :column_name2, :newtype
change_column :table_name2, :column_name, :newtype
end
def self.down
change_column :table_name, :column_name, :oldtype
change_column :table_name, :column_name2, :oldtype
change_column :table_name2, :column_name, :oldtype
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment