graphql-engine/server/src-rsr/migrations/45_to_46.sql
Rakesh Emmadi 13bedf5821 server/postgres: fix resetting the metadata catalog version to 43 while initializing postgres source with 1.0 catalog (#1645)
* fix resetting the catalog version to 43 on migration from 1.0 to 2.0

* ci: remove applying patch in test_oss_server_upgrade job

* make the 43 to 46th migrations idempotent

* Set missing HASURA_GRAPHQL_EVENTS_HTTP_POOL_SIZE=8 in upgrade_test

It's not clear why this wasn't caught in CI.

* ci: disable one component of event backpressure test

Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
Co-authored-by: Brandon Simmons <brandon@hasura.io>
GitOrigin-RevId: c74c6425266a99165c6beecc3e4f7c34e6884d4d
2021-06-23 18:01:09 +00:00

8 lines
413 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 IF NOT EXISTS hdb_cron_events_unique_scheduled
ON hdb_catalog.hdb_cron_events (trigger_name, scheduled_time)
WHERE status = 'scheduled';