feat(DossierAsignment): create model
This commit is contained in:
parent
f313e4eaed
commit
5f5714678c
5 changed files with 53 additions and 1 deletions
14
db/migrate/20230630091637_create_dossier_assignments.rb
Normal file
14
db/migrate/20230630091637_create_dossier_assignments.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
class CreateDossierAssignments < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :dossier_assignments do |t|
|
||||
t.references :dossier, foreign_key: true, null: false
|
||||
t.string :mode, null: false
|
||||
t.bigint :groupe_instructeur_id
|
||||
t.bigint :previous_groupe_instructeur_id
|
||||
t.string :groupe_instructeur_label
|
||||
t.string :previous_groupe_instructeur_label
|
||||
t.string :assigned_by
|
||||
t.timestamp :assigned_at, null: false
|
||||
end
|
||||
end
|
||||
end
|
15
db/schema.rb
15
db/schema.rb
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_07_18_113720) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_07_18_113820) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
|
@ -307,6 +307,18 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_18_113720) do
|
|||
t.index ["procedure_id"], name: "index_deleted_dossiers_on_procedure_id"
|
||||
end
|
||||
|
||||
create_table "dossier_assignments", force: :cascade do |t|
|
||||
t.datetime "assigned_at", precision: nil, null: false
|
||||
t.string "assigned_by"
|
||||
t.bigint "dossier_id", null: false
|
||||
t.bigint "groupe_instructeur_id"
|
||||
t.string "groupe_instructeur_label"
|
||||
t.string "mode", null: false
|
||||
t.bigint "previous_groupe_instructeur_id"
|
||||
t.string "previous_groupe_instructeur_label"
|
||||
t.index ["dossier_id"], name: "index_dossier_assignments_on_dossier_id"
|
||||
end
|
||||
|
||||
create_table "dossier_batch_operations", force: :cascade do |t|
|
||||
t.bigint "batch_operation_id", null: false
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
|
@ -1030,6 +1042,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_18_113720) do
|
|||
add_foreign_key "commentaires", "dossiers"
|
||||
add_foreign_key "commentaires", "experts"
|
||||
add_foreign_key "commentaires", "instructeurs"
|
||||
add_foreign_key "dossier_assignments", "dossiers"
|
||||
add_foreign_key "dossier_batch_operations", "batch_operations"
|
||||
add_foreign_key "dossier_batch_operations", "dossiers"
|
||||
add_foreign_key "dossier_corrections", "commentaires"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue