mirror of
https://github.com/mastodon/mastodon.git
synced 2025-05-09 05:06:14 +00:00
Add missing on_delete: :cascade
on notification_permissions
(#32281)
Some checks are pending
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
CSS Linting / lint (push) Waiting to run
JavaScript Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
JavaScript Testing / test (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.1) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / Libvips tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.1) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Some checks are pending
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
CSS Linting / lint (push) Waiting to run
JavaScript Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
JavaScript Testing / test (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.1) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / Libvips tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.1) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
This commit is contained in:
parent
0ce2db4f7d
commit
a59160cf01
|
@ -0,0 +1,39 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class FixNotificationPermissionForeignKeys < ActiveRecord::Migration[7.1]
|
||||||
|
def up
|
||||||
|
safety_assured do
|
||||||
|
execute <<~SQL.squish
|
||||||
|
ALTER TABLE notification_permissions
|
||||||
|
DROP CONSTRAINT fk_rails_7c0bed08df,
|
||||||
|
ADD CONSTRAINT fk_rails_7c0bed08df
|
||||||
|
FOREIGN KEY (account_id)
|
||||||
|
REFERENCES accounts(id)
|
||||||
|
ON DELETE CASCADE,
|
||||||
|
|
||||||
|
DROP CONSTRAINT fk_rails_e3e0aaad70,
|
||||||
|
ADD CONSTRAINT fk_rails_e3e0aaad70
|
||||||
|
FOREIGN KEY (from_account_id)
|
||||||
|
REFERENCES accounts(id)
|
||||||
|
ON DELETE CASCADE
|
||||||
|
SQL
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
safety_assured do
|
||||||
|
execute <<~SQL.squish
|
||||||
|
ALTER TABLE notification_permissions
|
||||||
|
DROP CONSTRAINT fk_rails_7c0bed08df,
|
||||||
|
ADD CONSTRAINT fk_rails_7c0bed08df
|
||||||
|
FOREIGN KEY (account_id)
|
||||||
|
REFERENCES accounts(id),
|
||||||
|
|
||||||
|
DROP CONSTRAINT fk_rails_e3e0aaad70,
|
||||||
|
ADD CONSTRAINT fk_rails_e3e0aaad70
|
||||||
|
FOREIGN KEY (from_account_id)
|
||||||
|
REFERENCES accounts(id)
|
||||||
|
SQL
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.1].define(version: 2024_09_16_190140) do
|
ActiveRecord::Schema[7.1].define(version: 2024_10_07_071624) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
|
@ -1291,8 +1291,8 @@ ActiveRecord::Schema[7.1].define(version: 2024_09_16_190140) do
|
||||||
add_foreign_key "mentions", "statuses", on_delete: :cascade
|
add_foreign_key "mentions", "statuses", on_delete: :cascade
|
||||||
add_foreign_key "mutes", "accounts", column: "target_account_id", name: "fk_eecff219ea", on_delete: :cascade
|
add_foreign_key "mutes", "accounts", column: "target_account_id", name: "fk_eecff219ea", on_delete: :cascade
|
||||||
add_foreign_key "mutes", "accounts", name: "fk_b8d8daf315", on_delete: :cascade
|
add_foreign_key "mutes", "accounts", name: "fk_b8d8daf315", on_delete: :cascade
|
||||||
add_foreign_key "notification_permissions", "accounts"
|
add_foreign_key "notification_permissions", "accounts", column: "from_account_id", on_delete: :cascade
|
||||||
add_foreign_key "notification_permissions", "accounts", column: "from_account_id"
|
add_foreign_key "notification_permissions", "accounts", on_delete: :cascade
|
||||||
add_foreign_key "notification_policies", "accounts", on_delete: :cascade
|
add_foreign_key "notification_policies", "accounts", on_delete: :cascade
|
||||||
add_foreign_key "notification_requests", "accounts", column: "from_account_id", on_delete: :cascade
|
add_foreign_key "notification_requests", "accounts", column: "from_account_id", on_delete: :cascade
|
||||||
add_foreign_key "notification_requests", "accounts", on_delete: :cascade
|
add_foreign_key "notification_requests", "accounts", on_delete: :cascade
|
||||||
|
|
Loading…
Reference in New Issue
Block a user