From 810d272be25e4094431eaf2be9218e62ff58264f Mon Sep 17 00:00:00 2001 From: mfo Date: Wed, 5 Jun 2024 17:02:59 +0200 Subject: [PATCH] feat(procedure_revision): add ineligibilite columns --- ...409075536_add_transitions_rules_to_procedure_revisions.rb | 5 +++++ ...7_add_dossier_ineligble_message_to_procedure_revisions.rb | 5 +++++ ...dd_eligibilite_dossiers_enabled_to_procedure_revisions.rb | 5 +++++ db/schema.rb | 3 +++ 4 files changed, 18 insertions(+) create mode 100644 db/migrate/20240409075536_add_transitions_rules_to_procedure_revisions.rb create mode 100644 db/migrate/20240514075727_add_dossier_ineligble_message_to_procedure_revisions.rb create mode 100644 db/migrate/20240516095601_add_eligibilite_dossiers_enabled_to_procedure_revisions.rb diff --git a/db/migrate/20240409075536_add_transitions_rules_to_procedure_revisions.rb b/db/migrate/20240409075536_add_transitions_rules_to_procedure_revisions.rb new file mode 100644 index 000000000..e2a654783 --- /dev/null +++ b/db/migrate/20240409075536_add_transitions_rules_to_procedure_revisions.rb @@ -0,0 +1,5 @@ +class AddTransitionsRulesToProcedureRevisions < ActiveRecord::Migration[7.0] + def change + add_column :procedure_revisions, :ineligibilite_rules, :jsonb + end +end diff --git a/db/migrate/20240514075727_add_dossier_ineligble_message_to_procedure_revisions.rb b/db/migrate/20240514075727_add_dossier_ineligble_message_to_procedure_revisions.rb new file mode 100644 index 000000000..bf8464f8c --- /dev/null +++ b/db/migrate/20240514075727_add_dossier_ineligble_message_to_procedure_revisions.rb @@ -0,0 +1,5 @@ +class AddDossierIneligbleMessageToProcedureRevisions < ActiveRecord::Migration[7.0] + def change + add_column :procedure_revisions, :ineligibilite_message, :text + end +end diff --git a/db/migrate/20240516095601_add_eligibilite_dossiers_enabled_to_procedure_revisions.rb b/db/migrate/20240516095601_add_eligibilite_dossiers_enabled_to_procedure_revisions.rb new file mode 100644 index 000000000..19ce1d243 --- /dev/null +++ b/db/migrate/20240516095601_add_eligibilite_dossiers_enabled_to_procedure_revisions.rb @@ -0,0 +1,5 @@ +class AddEligibiliteDossiersEnabledToProcedureRevisions < ActiveRecord::Migration[7.0] + def change + add_column :procedure_revisions, :ineligibilite_enabled, :boolean, default: false, null: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 6f7fcfe7c..b33a10582 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -863,6 +863,9 @@ ActiveRecord::Schema[7.0].define(version: 2024_05_27_090508) do create_table "procedure_revisions", force: :cascade do |t| t.datetime "created_at", precision: nil, null: false t.bigint "dossier_submitted_message_id" + t.boolean "ineligibilite_enabled", default: false, null: false + t.text "ineligibilite_message" + t.jsonb "ineligibilite_rules" t.bigint "procedure_id", null: false t.datetime "published_at", precision: nil t.datetime "updated_at", precision: nil, null: false