Merge pull request #9378 from demarches-simplifiees/cleaning-after-new-routing-logic-second_part

Nettoyage du code de l'ancien système de routage (suite)
This commit is contained in:
Eric Leroy-Terquem 2023-08-01 16:22:43 +00:00 committed by GitHub
commit 275ebb6d40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View file

@ -58,8 +58,6 @@ class Dossier < ApplicationRecord
include DossierSearchableConcern include DossierSearchableConcern
include DossierSectionsConcern include DossierSectionsConcern
self.ignored_columns += [:migrated_champ_routage]
enum state: { enum state: {
brouillon: 'brouillon', brouillon: 'brouillon',
en_construction: 'en_construction', en_construction: 'en_construction',

View file

@ -79,7 +79,7 @@ class Procedure < ApplicationRecord
:cerfa_flag, :cerfa_flag,
:test_started_at, :test_started_at,
:lien_demarche, :lien_demarche,
:migrated_champ_routage :routing_criteria_name
] ]
default_scope -> { kept } default_scope -> { kept }

View file

@ -13,7 +13,6 @@
# #
class ProcedureRevision < ApplicationRecord class ProcedureRevision < ApplicationRecord
self.implicit_order_column = :created_at self.implicit_order_column = :created_at
self.ignored_columns += [:migrated_champ_routage]
belongs_to :procedure, -> { with_discarded }, inverse_of: :revisions, optional: false belongs_to :procedure, -> { with_discarded }, inverse_of: :revisions, optional: false
belongs_to :dossier_submitted_message, inverse_of: :revisions, optional: true, dependent: :destroy belongs_to :dossier_submitted_message, inverse_of: :revisions, optional: true, dependent: :destroy

View file

@ -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