add dedicated dossier_folder, export_pdf, pjs columns to export model

Destroy all previous incompatible ExportTemplate
This commit is contained in:
simon lehericey 2024-07-18 09:55:06 +02:00
parent 53a48f963d
commit 106698a242
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,15 @@
class AddDossierFolderColumnToExportTemplate < ActiveRecord::Migration[7.0]
def up
execute "DELETE FROM export_templates;"
add_column :export_templates, :dossier_folder, :jsonb, default: nil, null: false
add_column :export_templates, :export_pdf, :jsonb, default: nil, null: false
add_column :export_templates, :pjs, :jsonb, array: true, default: [], null: false
end
def down
remove_column :export_templates, :dossier_folder
remove_column :export_templates, :export_pdf
remove_column :export_templates, :pjs
end
end