Created
December 8, 2014 23:22
-
-
Save postazure/e2def917faf9f1d4e51d to your computer and use it in GitHub Desktop.
add timestamps to existing table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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