Files
fizzy/db/migrate/20250404083727_add_reason_to_pops.rb
T
2025-04-04 15:06:43 +02:00

19 lines
358 B
Ruby

class AddReasonToPops < ActiveRecord::Migration[8.1]
def change
add_column :pops, :reason, :string
create_table :pop_reasons do |t|
t.references :account, index: true
t.string :label
t.timestamps
end
execute <<~SQL
update pops set reason = 'Closed'
SQL
change_column_null :pops, :reason, false
end
end