1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Add on_delete: :cascade

This commit is contained in:
Adam Niedzielski 2024-07-29 13:50:38 +02:00
parent ee58baf14e
commit bab725fc31
No known key found for this signature in database
GPG key ID: D97FC2C798BAC058
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@ class CreateAccountSecrets < ActiveRecord::Migration[7.1]
def change def change
create_table :account_secrets do |t| create_table :account_secrets do |t|
t.text :private_key t.text :private_key
t.references :account, null: false, foreign_key: true t.references :account, null: false, foreign_key: { on_delete: :cascade }
t.timestamps t.timestamps
end end

View file

@ -1282,7 +1282,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_07_26_143215) do
add_foreign_key "account_pins", "accounts", on_delete: :cascade add_foreign_key "account_pins", "accounts", on_delete: :cascade
add_foreign_key "account_relationship_severance_events", "accounts", on_delete: :cascade add_foreign_key "account_relationship_severance_events", "accounts", on_delete: :cascade
add_foreign_key "account_relationship_severance_events", "relationship_severance_events", on_delete: :cascade add_foreign_key "account_relationship_severance_events", "relationship_severance_events", on_delete: :cascade
add_foreign_key "account_secrets", "accounts" add_foreign_key "account_secrets", "accounts", on_delete: :cascade
add_foreign_key "account_stats", "accounts", on_delete: :cascade add_foreign_key "account_stats", "accounts", on_delete: :cascade
add_foreign_key "account_statuses_cleanup_policies", "accounts", on_delete: :cascade add_foreign_key "account_statuses_cleanup_policies", "accounts", on_delete: :cascade
add_foreign_key "account_warnings", "accounts", column: "target_account_id", on_delete: :cascade add_foreign_key "account_warnings", "accounts", column: "target_account_id", on_delete: :cascade