Suppression de colonnes dépréciées sur Procedure (#4093)

Suppression de colonnes dépréciées sur Procedure
This commit is contained in:
Pierre de La Morinerie 2019-07-11 16:12:28 +02:00 committed by GitHub
commit ba137279d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

@ -3,8 +3,6 @@ require Rails.root.join('lib', 'percentile')
class Procedure < ApplicationRecord
MAX_DUREE_CONSERVATION = 36
self.ignored_columns = [:individual_with_siret, :expects_multiple_submissions]
has_many :types_de_piece_justificative, -> { ordered }, inverse_of: :procedure, dependent: :destroy
has_many :types_de_champ, -> { root.public_only.ordered }, inverse_of: :procedure, dependent: :destroy
has_many :types_de_champ_private, -> { root.private_only.ordered }, class_name: 'TypeDeChamp', inverse_of: :procedure, dependent: :destroy

View file

@ -0,0 +1,5 @@
class RemoveExpectsMultipleSubmissionsFromProcedure < ActiveRecord::Migration[5.2]
def change
remove_column :procedures, :expects_multiple_submissions, :boolean, default: false, null: false
end
end

View file

@ -0,0 +1,5 @@
class RemoveIndividualWithSiretFromProcedure < ActiveRecord::Migration[5.2]
def change
remove_column :procedures, :individual_with_siret, :boolean, default: false
end
end