I need to add timestamps (created_at & updated_at) to an existing table. I tried the following code but it didn\'t work.
created_at
updated_at
class
I'm on rails 5.0 and none of these options worked.
The only thing that worked was using the type to be :timestamp and not :datetime
def change add_column :users, :created_at, :timestamp add_column :users, :updated_at, :timestamp end