mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 01:44:03 +03:00
2d9959b174
GitOrigin-RevId: 3939001a90de041d588c4133ecc1b28b35734d72
8 lines
399 B
SQL
8 lines
399 B
SQL
-- This index is added to avoid creating duplicate cron
|
|
-- events when multiple Hasura instances are running.
|
|
-- This is a partial index for backwards compatibility i.e.
|
|
-- the metadata db might already have duplicated events before this change was added.
|
|
CREATE UNIQUE INDEX hdb_cron_events_unique_scheduled
|
|
ON hdb_catalog.hdb_cron_events (trigger_name, scheduled_time)
|
|
WHERE status = 'scheduled';
|