db(routing): remove migrated champ routage columns

This commit is contained in:
Eric Leroy-Terquem 2023-08-01 16:21:13 +02:00
parent 9c8b015b45
commit cdbaf987c0
4 changed files with 8 additions and 5 deletions

View file

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

View file

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

View file

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

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