fix(migration): omit index for old versions of postgres
This commit is contained in:
parent
6b16330eea
commit
cf412a4b54
@ -831,9 +831,6 @@ customMigrations = Map.fromListWith (>>)
|
|||||||
ALTER TABLE "file" RENAME TO "file_content";
|
ALTER TABLE "file" RENAME TO "file_content";
|
||||||
DELETE FROM "file_content" WHERE "content" IS NULL OR "hash" IS NULL;
|
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|
|
[executeQQ|
|
||||||
DELETE FROM "file_content"
|
DELETE FROM "file_content"
|
||||||
WHERE "id" IN (
|
WHERE "id" IN (
|
||||||
@ -852,7 +849,6 @@ customMigrations = Map.fromListWith (>>)
|
|||||||
WHERE t.rnum > 1);
|
WHERE t.rnum > 1);
|
||||||
|]
|
|]
|
||||||
[executeQQ|
|
[executeQQ|
|
||||||
DROP INDEX "file_content_hash_idx";
|
|
||||||
ALTER TABLE "file_content" DROP COLUMN "title";
|
ALTER TABLE "file_content" DROP COLUMN "title";
|
||||||
ALTER TABLE "file_content" DROP COLUMN "modified";
|
ALTER TABLE "file_content" DROP COLUMN "modified";
|
||||||
ALTER TABLE "file_content" DROP COLUMN "id";
|
ALTER TABLE "file_content" DROP COLUMN "id";
|
||||||
|
|||||||
Reference in New Issue
Block a user