sqm-dashboards/db/migrate/20211102130250_add_timestamps_to_survey_items.rb
2021-11-02 09:05:56 -04:00

10 lines
335 B
Ruby

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