mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-20 05:51:54 +03:00
8 lines
399 B
MySQL
8 lines
399 B
MySQL
|
-- 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';
|