Update migration DeleteDefaultDescriptionToDossier
This commit is contained in:
parent
954ac2bc86
commit
eb1e4fe7ce
1 changed files with 2 additions and 0 deletions
|
@ -41,6 +41,8 @@ class DeleteDefaultDescriptionToDossier < ActiveRecord::Migration
|
|||
def down
|
||||
add_column :dossiers, :description, :text
|
||||
|
||||
Champ.destroy_all(dossier_id: 0)
|
||||
|
||||
TypeDeChamp.where(libelle: 'Description', type_champ: 'textarea', order_place: 0, mandatory: true).each do |type_de_champ|
|
||||
Champ.where(type_de_champ_id: type_de_champ.id).each do |champ|
|
||||
dossier = Dossier.find(champ.dossier_id)
|
||||
|
|
Loading…
Reference in a new issue