fix mysql migrations

This commit is contained in:
Pete Matsyburka
2026-08-06 17:50:03 +03:00
parent 7dddef4c94
commit dc1de72e18
2 changed files with 3 additions and 2 deletions
@@ -6,7 +6,8 @@ class CreateLockEvents < ActiveRecord::Migration[8.0]
t.string :key, index: true, null: false t.string :key, index: true, null: false
t.string :event_name, null: false t.string :event_name, null: false
t.index %i[event_name key], unique: adapter_name != 'Mysql2', where: "event_name IN ('start', 'complete')" t.index %i[event_name key], unique: connection.supports_partial_index?,
where: "event_name IN ('start', 'complete')"
t.timestamps t.timestamps
end end
@@ -10,7 +10,7 @@ class AddIsFirstToCompletedSubmitters < ActiveRecord::Migration[8.0]
where: 'is_first = TRUE', where: 'is_first = TRUE',
name: 'index_completed_submitters_account_id_completed_at_is_first' name: 'index_completed_submitters_account_id_completed_at_is_first'
add_index :completed_submitters, :submission_id, unique: adapter_name != 'Mysql2', add_index :completed_submitters, :submission_id, unique: connection.supports_partial_index?,
where: 'is_first = TRUE' where: 'is_first = TRUE'
end end
end end