mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
10 lines
335 B
Ruby
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
|