feat: add index for snapshots (#8163)

This commit is contained in:
darkskygit
2024-09-08 13:49:40 +00:00
parent 57083905ff
commit 2a135d8a93
5 changed files with 31 additions and 15 deletions
@@ -0,0 +1,12 @@
/*
Warnings:
- The primary key for the `snapshots` table will be changed. If it partially fails, the table could be left without primary key constraint.
*/
-- AlterTable
ALTER TABLE "snapshots" DROP CONSTRAINT "snapshots_pkey",
ADD CONSTRAINT "snapshots_pkey" PRIMARY KEY ("workspace_id", "guid");
-- CreateIndex
CREATE INDEX "snapshots_workspace_id_updated_at_idx" ON "snapshots"("workspace_id", "updated_at");