add export template migration
This commit is contained in:
parent
93ad0f4bda
commit
474eb18016
2 changed files with 23 additions and 0 deletions
12
db/migrate/20240130154452_create_export_templates.rb
Normal file
12
db/migrate/20240130154452_create_export_templates.rb
Normal 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
|
11
db/schema.rb
11
db/schema.rb
|
@ -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"
|
t.index ["procedure_id"], name: "index_experts_procedures_on_procedure_id"
|
||||||
end
|
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|
|
create_table "exports", force: :cascade do |t|
|
||||||
t.datetime "created_at", precision: nil, null: false
|
t.datetime "created_at", precision: nil, null: false
|
||||||
t.integer "dossiers_count"
|
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", "users"
|
||||||
add_foreign_key "experts_procedures", "experts"
|
add_foreign_key "experts_procedures", "experts"
|
||||||
add_foreign_key "experts_procedures", "procedures"
|
add_foreign_key "experts_procedures", "procedures"
|
||||||
|
add_foreign_key "export_templates", "groupe_instructeurs"
|
||||||
add_foreign_key "exports", "instructeurs"
|
add_foreign_key "exports", "instructeurs"
|
||||||
add_foreign_key "france_connect_informations", "users"
|
add_foreign_key "france_connect_informations", "users"
|
||||||
add_foreign_key "geo_areas", "champs"
|
add_foreign_key "geo_areas", "champs"
|
||||||
|
|
Loading…
Reference in a new issue