From d7f6b4a774f1c338574ba7fa8ce2f60ff89ba25c Mon Sep 17 00:00:00 2001 From: s3inlc Date: Tue, 9 Dec 2025 09:19:40 +0100 Subject: [PATCH 1/2] added new unique index update for postgres --- src/migrations/mysql/20251209091723_postgres-index-fix.sql | 1 + src/migrations/postgres/20251209091723_postgres-index-fix.sql | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 src/migrations/mysql/20251209091723_postgres-index-fix.sql create mode 100644 src/migrations/postgres/20251209091723_postgres-index-fix.sql diff --git a/src/migrations/mysql/20251209091723_postgres-index-fix.sql b/src/migrations/mysql/20251209091723_postgres-index-fix.sql new file mode 100644 index 000000000..5c12d9e57 --- /dev/null +++ b/src/migrations/mysql/20251209091723_postgres-index-fix.sql @@ -0,0 +1 @@ +-- This migration is only a placeholder to keep migrations parallel diff --git a/src/migrations/postgres/20251209091723_postgres-index-fix.sql b/src/migrations/postgres/20251209091723_postgres-index-fix.sql new file mode 100644 index 000000000..9273d4e75 --- /dev/null +++ b/src/migrations/postgres/20251209091723_postgres-index-fix.sql @@ -0,0 +1,2 @@ +DROP INDEX IF EXISTS hash_hash_idx; +CREATE UNIQUE INDEX IF NOT EXISTS hash_hash_idx ON hash(hashtext(hash)); From 78d2b0653c5b3a813097f269a85db34f6121ee77 Mon Sep 17 00:00:00 2001 From: s3inlc Date: Tue, 9 Dec 2025 09:36:31 +0100 Subject: [PATCH 2/2] index must not be uniqe for hash --- src/migrations/postgres/20251209091723_postgres-index-fix.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migrations/postgres/20251209091723_postgres-index-fix.sql b/src/migrations/postgres/20251209091723_postgres-index-fix.sql index 9273d4e75..02d242646 100644 --- a/src/migrations/postgres/20251209091723_postgres-index-fix.sql +++ b/src/migrations/postgres/20251209091723_postgres-index-fix.sql @@ -1,2 +1,2 @@ DROP INDEX IF EXISTS hash_hash_idx; -CREATE UNIQUE INDEX IF NOT EXISTS hash_hash_idx ON hash(hashtext(hash)); +CREATE INDEX IF NOT EXISTS hash_hash_idx ON hash(hashtext(hash));