add export template migration

This commit is contained in:
Christophe Robillard 2024-03-02 21:47:48 +01:00 committed by simon lehericey
parent 93ad0f4bda
commit 474eb18016
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,12 @@
class CreateExportTemplates < ActiveRecord::Migration[7.0]
def change
create_table :export_templates do |t|
t.string :name, null: false
t.string :kind, null: false
t.jsonb :content, default: {}
t.belongs_to :groupe_instructeur, null: false, foreign_key: true
t.timestamps
end
end
end

View file

@ -593,6 +593,16 @@ ActiveRecord::Schema[7.0].define(version: 2024_04_17_053843) do
t.index ["procedure_id"], name: "index_experts_procedures_on_procedure_id"
end
create_table "export_templates", force: :cascade do |t|
t.jsonb "content", default: {}
t.datetime "created_at", null: false
t.bigint "groupe_instructeur_id", null: false
t.string "kind", null: false
t.string "name", null: false
t.datetime "updated_at", null: false
t.index ["groupe_instructeur_id"], name: "index_export_templates_on_groupe_instructeur_id"
end
create_table "exports", force: :cascade do |t|
t.datetime "created_at", precision: nil, null: false
t.integer "dossiers_count"
@ -1224,6 +1234,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_04_17_053843) do
add_foreign_key "experts", "users"
add_foreign_key "experts_procedures", "experts"
add_foreign_key "experts_procedures", "procedures"
add_foreign_key "export_templates", "groupe_instructeurs"
add_foreign_key "exports", "instructeurs"
add_foreign_key "france_connect_informations", "users"
add_foreign_key "geo_areas", "champs"