add submission tracking events

This commit is contained in:
Alex Turchyn
2023-09-10 12:55:41 +03:00
parent 62cea05084
commit 8cabe31827
15 changed files with 190 additions and 4 deletions
@@ -0,0 +1,15 @@
# frozen_string_literal: true
class CreateSubmissionEvents < ActiveRecord::Migration[7.0]
def change
create_table :submission_events do |t|
t.references :submission, null: false, foreign_key: true, index: true
t.references :submitter, null: true, foreign_key: true, index: true
t.text :data, null: false
t.string :event_type, null: false
t.datetime :event_timestamp, null: false
t.timestamps
end
end
end