correctif(db): force active_storage_attachments.blob fk on active_storage_blobs

This commit is contained in:
Martin 2023-02-16 15:43:35 +01:00
parent de11d97df9
commit 514835af1c
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
class ValidateForeignKeyBetweenAttachmentsAndBlobs < ActiveRecord::Migration[6.1]
def up
validate_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2023_02_07_105539) do
ActiveRecord::Schema.define(version: 2023_02_16_141558) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"