mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Only run if not exists
This commit is contained in:
@@ -2,6 +2,7 @@ class AddIndexToHeartbeats < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_index :heartbeats, [ :user_id, :time ],
|
||||
name: "idx_heartbeats_user_time_active",
|
||||
where: "deleted_at IS NULL"
|
||||
where: "deleted_at IS NULL",
|
||||
if_not_exists: true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user