synchronize documents generation

This commit is contained in:
Alex Turchyn
2023-07-01 13:16:07 +03:00
parent e55b5b47cd
commit 4180d02a1b
15 changed files with 148 additions and 12 deletions
@@ -0,0 +1,14 @@
# frozen_string_literal: true
class CreateDocumentGenerationEvents < ActiveRecord::Migration[7.0]
def change
create_table :document_generation_events do |t|
t.references :submitter, null: false, foreign_key: true, index: true
t.string :event_name, null: false
t.index %i[submitter_id event_name], unique: true, where: "event_name IN ('start', 'complete')"
t.timestamps
end
end
end