You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sqm-dashboards/db/migrate/20211102130250_add_timestam...

11 lines
335 B

class AddTimestampsToSurveyItems < ActiveRecord::Migration[6.1]
def change
now = Time.zone.now
change_table :survey_items do |t|
t.timestamps default: now
end
change_column_default :survey_items, :created_at, from: now, to: nil
change_column_default :survey_items, :updated_at, from: now, to: nil
end
end