From fa18ebd63aa280307f7d03805bc7b25e07eec629 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 20 Oct 2022 11:45:02 +0200 Subject: [PATCH] fix(message): add instructeurs foreign key --- ...0094031_add_foreign_key_to_commentaires_instructeur_id.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20221020094031_add_foreign_key_to_commentaires_instructeur_id.rb diff --git a/db/migrate/20221020094031_add_foreign_key_to_commentaires_instructeur_id.rb b/db/migrate/20221020094031_add_foreign_key_to_commentaires_instructeur_id.rb new file mode 100644 index 000000000..b6a9fd1af --- /dev/null +++ b/db/migrate/20221020094031_add_foreign_key_to_commentaires_instructeur_id.rb @@ -0,0 +1,5 @@ +class AddForeignKeyToCommentairesInstructeurId < ActiveRecord::Migration[6.1] + def change + add_foreign_key :commentaires, :instructeurs, validate: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 4c69c11bd..2bda24d01 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2022_10_13_142432) do +ActiveRecord::Schema.define(version: 2022_10_20_094031) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -913,6 +913,7 @@ ActiveRecord::Schema.define(version: 2022_10_13_142432) do add_foreign_key "closed_mails", "procedures" add_foreign_key "commentaires", "dossiers" add_foreign_key "commentaires", "experts" + add_foreign_key "commentaires", "instructeurs" add_foreign_key "dossier_operation_logs", "bill_signatures" add_foreign_key "dossier_transfer_logs", "dossiers" add_foreign_key "dossiers", "dossier_transfers"