forgeplus/db/migrate/20200515080705_add_created_...

7 lines
180 B
Ruby

class AddCreatedAtToWatcher < ActiveRecord::Migration[5.2]
def change
add_column :watchers, :created_at, :datetime
Watcher.update_all(created_at: Time.current)
end
end