Skip to content

Instantly share code, notes, and snippets.

@buk
Created April 28, 2011 21:16
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 buk/947356 to your computer and use it in GitHub Desktop.
Save buk/947356 to your computer and use it in GitHub Desktop.
rails g migration AddCustomerAppointmentToReport
rails g migration AddCustomerAppointmentToReport customer_appointment:date
## migration file
class AddCustomerAppointmentToReport < ActiveRecord::Migration
def self.up
add_column :reports, :customer_appointment, :date
end
def self.down
remove_column :reports, :customer_appointment
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment