fix(migration): omit index for old versions of postgres

This commit is contained in:
Gregor Kleen 2020-07-18 16:42:41 +02:00
parent 6b16330eea
commit cf412a4b54

View File

@ -831,9 +831,6 @@ customMigrations = Map.fromListWith (>>)
ALTER TABLE "file" RENAME TO "file_content";
DELETE FROM "file_content" WHERE "content" IS NULL OR "hash" IS NULL;
|]
[executeQQ|
CREATE INDEX "file_content_hash_idx" ON "file_content" ("hash") INCLUDE ("id");
|]
[executeQQ|
DELETE FROM "file_content"
WHERE "id" IN (
@ -852,7 +849,6 @@ customMigrations = Map.fromListWith (>>)
WHERE t.rnum > 1);
|]
[executeQQ|
DROP INDEX "file_content_hash_idx";
ALTER TABLE "file_content" DROP COLUMN "title";
ALTER TABLE "file_content" DROP COLUMN "modified";
ALTER TABLE "file_content" DROP COLUMN "id";