diff --git a/migrations/202401092201_add_events_id_index.go b/migrations/202401092201_add_events_id_index.go index 7b2ef48e..babb014f 100644 --- a/migrations/202401092201_add_events_id_index.go +++ b/migrations/202401092201_add_events_id_index.go @@ -9,7 +9,7 @@ import ( var _202401092201_add_events_id_index = &gormigrate.Migration{ ID: "202401092201_add_events_id_index", Migrate: func(tx *gorm.DB) error { - return tx.Exec("CREATE INDEX idx_nostr_events_app_id_and_id ON nostr_events(app_id, id)").Error + return tx.Exec("CREATE INDEX IF NOT EXISTS idx_nostr_events_app_id_and_id ON nostr_events(app_id, id)").Error }, Rollback: func(tx *gorm.DB) error { return nil