Skip to content

Instantly share code, notes, and snippets.

@postazure
Created December 8, 2014 23:22
Show Gist options
  • Save postazure/e2def917faf9f1d4e51d to your computer and use it in GitHub Desktop.
Save postazure/e2def917faf9f1d4e51d to your computer and use it in GitHub Desktop.
add timestamps to existing table
class AddTimestampsToProducts < ActiveRecord::Migration
def change_table
add_column(:products, :created_at, :datetime)
add_column(:products, :updated_at, :datetime)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment