Merge remote-tracking branch 'parent/main' into upstream-20240517

This commit is contained in:
KMY 2024-05-17 08:53:59 +09:00
commit 094ff9d2ee
153 changed files with 1412 additions and 631 deletions

View file

@ -0,0 +1,28 @@
# frozen_string_literal: true
class FixNotificationPoliciesForeignKey < ActiveRecord::Migration[7.1]
def up
safety_assured do
execute <<~SQL.squish
ALTER TABLE notification_policies
DROP CONSTRAINT fk_rails_506d62f0da,
ADD CONSTRAINT fk_rails_506d62f0da
FOREIGN KEY (account_id)
REFERENCES accounts(id)
ON DELETE CASCADE
SQL
end
end
def down
safety_assured do
execute <<~SQL.squish
ALTER TABLE notification_policies
DROP CONSTRAINT fk_rails_506d62f0da,
ADD CONSTRAINT fk_rails_506d62f0da
FOREIGN KEY (account_id)
REFERENCES accounts(id)
SQL
end
end
end