correctif(db.active_storage_attachements): ajoute un fk non validable a priori pour eviter les problemes d'attachments sans blob

This commit is contained in:
Martin 2023-02-16 14:09:05 +01:00
parent de11d97df9
commit 0427c28103
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
class FixActiveStorageAttachmentMissingFkOnBlobId < ActiveRecord::Migration[6.1]
def change
add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id, validate: false
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_130722) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"