mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
Only run if not exists
This commit is contained in:
parent
62a7a8a7a3
commit
eccd1acc9b
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue