Merge pull request #8648 from demarches-simplifiees/ensure-pg-fk-between-attachments-and-blobs
correctif(db): force active_storage_attachments.blob fk on active_storage_blobs
This commit is contained in:
commit
3b3bdbfe3e
2 changed files with 6 additions and 1 deletions
|
@ -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
|
|
@ -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.define(version: 2023_02_16_130722) do
|
ActiveRecord::Schema.define(version: 2023_02_16_141558) 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 "pgcrypto"
|
enable_extension "pgcrypto"
|
||||||
|
|
Loading…
Reference in a new issue