From bbb38232122d263c67dc9127e5ac94469d70c698 Mon Sep 17 00:00:00 2001 From: Eric Leroy-Terquem Date: Wed, 2 Aug 2023 18:17:26 +0200 Subject: [PATCH] db(routing): remove routing criteria name column --- app/models/procedure.rb | 3 +-- .../20230802161011_remove_routing_criteria_name_column.rb | 7 +++++++ db/schema.rb | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20230802161011_remove_routing_criteria_name_column.rb diff --git a/app/models/procedure.rb b/app/models/procedure.rb index b3a08198a..482a0fd30 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -12,8 +12,7 @@ class Procedure < ApplicationRecord :durees_conservation_required, :cerfa_flag, :test_started_at, - :lien_demarche, - :routing_criteria_name + :lien_demarche ] default_scope -> { kept } diff --git a/db/migrate/20230802161011_remove_routing_criteria_name_column.rb b/db/migrate/20230802161011_remove_routing_criteria_name_column.rb new file mode 100644 index 000000000..7861905f9 --- /dev/null +++ b/db/migrate/20230802161011_remove_routing_criteria_name_column.rb @@ -0,0 +1,7 @@ +class RemoveRoutingCriteriaNameColumn < ActiveRecord::Migration[7.0] + def change + safety_assured do + remove_column :procedures, :routing_criteria_name, :string, default: "Votre ville" + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 7a311bf9a..8837e43d6 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[7.0].define(version: 2023_08_02_121131) do +ActiveRecord::Schema[7.0].define(version: 2023_08_02_161011) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -777,7 +777,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_08_02_121131) do t.datetime "published_at", precision: 6 t.bigint "published_revision_id" t.bigint "replaced_by_procedure_id" - t.text "routing_criteria_name", default: "Votre ville" t.boolean "routing_enabled" t.bigint "service_id" t.jsonb "sva_svr", default: {}, null: false