Skip to content

Instantly share code, notes, and snippets.

@planet-argonbot
Created September 2, 2010 21:55
Show Gist options
  • Save planet-argonbot/563023 to your computer and use it in GitHub Desktop.
Save planet-argonbot/563023 to your computer and use it in GitHub Desktop.
def self.up
  # add a few new columns...  
  add_column :projects, :new_column_one, :float  
  add_column :projects, :new_column_two, :float
  Project.reset_column_information
  Project.all.each do |project|
    # perform some data cleaning here to move old stuff around  
  end
  remove_column :projects, :old_column
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment