Created
March 31, 2014 10:23
-
-
Save alagram/9889458 to your computer and use it in GitHub Desktop.
Add timestamps
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
| # Run this on console | |
| rails generate migration add_timestamsps | |
| # Then change migration file as seen here | |
| class AddTimestamps < ActiveRecord::Migration | |
| def change | |
| add_column :table_name, :created_at, :datetime | |
| add_column :table_name, :updated_at, :datetime | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment