add lock events

This commit is contained in:
Pete Matsyburka
2025-09-15 09:10:03 +03:00
parent 86d680cfdf
commit 04e7f101be
10 changed files with 210 additions and 15 deletions
@@ -0,0 +1,14 @@
# frozen_string_literal: true
class CreateLockEvents < ActiveRecord::Migration[8.0]
def change
create_table :lock_events do |t|
t.string :key, index: true, null: false
t.string :event_name, null: false
t.index %i[event_name key], unique: true, where: "event_name IN ('start', 'complete')"
t.timestamps
end
end
end