Rails g migration CreateFoo
This does not add created_at and update_at to the migration. Is there a way to generate a migration and add timestamps as a param?
Rails g migration CreateFoo timestamps
didn't work.
Seems like those only get generated automatically with models.
Otherwise you can add it manually in a create
with t.timestamps
or with add_timestamps :foo
to change
an existing table.