add dedicated dossier_folder, export_pdf, pjs columns to export model
Destroy all previous incompatible ExportTemplate
This commit is contained in:
parent
53a48f963d
commit
106698a242
2 changed files with 18 additions and 0 deletions
|
@ -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
|
|
@ -599,9 +599,12 @@ ActiveRecord::Schema[7.0].define(version: 2024_07_16_091043) do
|
|||
create_table "export_templates", force: :cascade do |t|
|
||||
t.jsonb "content", default: {}
|
||||
t.datetime "created_at", null: false
|
||||
t.jsonb "dossier_folder", null: false
|
||||
t.jsonb "export_pdf", null: false
|
||||
t.bigint "groupe_instructeur_id", null: false
|
||||
t.string "kind", null: false
|
||||
t.string "name", null: false
|
||||
t.jsonb "pjs", default: [], null: false, array: true
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["groupe_instructeur_id"], name: "index_export_templates_on_groupe_instructeur_id"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue