You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* This index with `ts DESC` enables our "loose index scan" queries
1646
-
* (i.e. `DISTINCT ON`) to run in both directions, complementing the
1647
-
* primary key's ts ASC ordering */
1648
-
IF to_regclass('@db_name.indexes_by_index_id_key_prefix_key_sha256_ts') IS NULL THEN
1649
-
CREATE UNIQUE INDEX IF NOT EXISTS indexes_by_index_id_key_prefix_key_sha256_ts ON @db_name.indexes (
1645
+
/* We only want this index created for new instances; existing ones already have `indexes_by_index_id_key_prefix_key_sha256_ts` */
1646
+
IF to_regclass('@db_name.indexes_by_index_id_key_prefix_key_sha256_ts') IS NULL AND to_regclass('@db_name.indexes_by_index_id_key_prefix_key_sha256') IS NULL THEN
1647
+
CREATE INDEX IF NOT EXISTS indexes_by_index_id_key_prefix_key_sha256 ON @db_name.indexes (
0 commit comments