diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 8714a834378..230250e2889 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -58,8 +58,6 @@ class Dossier < ApplicationRecord include DossierSearchableConcern include DossierSectionsConcern - self.ignored_columns += [:migrated_champ_routage] - enum state: { brouillon: 'brouillon', en_construction: 'en_construction', diff --git a/app/models/procedure.rb b/app/models/procedure.rb index 85887c9ee2a..33b9a7ae5b6 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -79,7 +79,7 @@ class Procedure < ApplicationRecord :cerfa_flag, :test_started_at, :lien_demarche, - :migrated_champ_routage + :routing_criteria_name ] default_scope -> { kept } diff --git a/app/models/procedure_revision.rb b/app/models/procedure_revision.rb index 20decec4cdf..0de68a045b1 100644 --- a/app/models/procedure_revision.rb +++ b/app/models/procedure_revision.rb @@ -13,7 +13,6 @@ # class ProcedureRevision < ApplicationRecord self.implicit_order_column = :created_at - self.ignored_columns += [:migrated_champ_routage] belongs_to :procedure, -> { with_discarded }, inverse_of: :revisions, optional: false belongs_to :dossier_submitted_message, inverse_of: :revisions, optional: true, dependent: :destroy diff --git a/db/migrate/20230801121131_remove_migrated_champ_routage_columns.rb b/db/migrate/20230801121131_remove_migrated_champ_routage_columns.rb new file mode 100644 index 00000000000..4a95b2f7d57 --- /dev/null +++ b/db/migrate/20230801121131_remove_migrated_champ_routage_columns.rb @@ -0,0 +1,7 @@ +class RemoveMigratedChampRoutageColumns < ActiveRecord::Migration[7.0] + def change + safety_assured { remove_column :procedures, :migrated_champ_routage } + safety_assured { remove_column :procedure_revisions, :migrated_champ_routage } + safety_assured { remove_column :dossiers, :migrated_champ_routage } + end +end