feat(dossier): dossier can be forked for editing

This commit is contained in:
Paul Chavard 2023-03-21 15:59:03 +01:00 committed by Colin Darie
parent 5a3cbcdb72
commit 025bd5beaf
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
7 changed files with 317 additions and 35 deletions

View file

@ -0,0 +1,7 @@
class AddEditingForksToDossiers < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
add_belongs_to :dossiers, :editing_fork_origin, null: true, index: { algorithm: :concurrently }
end
end

View file

@ -362,6 +362,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_05_02_160046) do
t.string "deleted_user_email_never_send"
t.datetime "depose_at", precision: 6
t.bigint "dossier_transfer_id"
t.bigint "editing_fork_origin_id"
t.datetime "en_construction_at", precision: 6
t.datetime "en_construction_close_to_expiration_notice_sent_at", precision: 6
t.datetime "en_instruction_at", precision: 6
@ -393,6 +394,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_05_02_160046) do
t.index ["archived"], name: "index_dossiers_on_archived"
t.index ["batch_operation_id"], name: "index_dossiers_on_batch_operation_id"
t.index ["dossier_transfer_id"], name: "index_dossiers_on_dossier_transfer_id"
t.index ["editing_fork_origin_id"], name: "index_dossiers_on_editing_fork_origin_id"
t.index ["groupe_instructeur_id"], name: "index_dossiers_on_groupe_instructeur_id"
t.index ["hidden_at"], name: "index_dossiers_on_hidden_at"
t.index ["prefill_token"], name: "index_dossiers_on_prefill_token", unique: true