feat(server): impl doc history (#5004)

This commit is contained in:
liuyi
2023-11-22 07:56:59 +00:00
parent 946b7b4004
commit d1476495ae
18 changed files with 783 additions and 35 deletions

View File

@@ -0,0 +1,14 @@
-- AlterTable
ALTER TABLE "blobs" ADD COLUMN "deleted_at" TIMESTAMPTZ(6);
-- CreateTable
CREATE TABLE "snapshot_histories" (
"workspace_id" VARCHAR(36) NOT NULL,
"guid" VARCHAR(36) NOT NULL,
"timestamp" TIMESTAMPTZ(6) NOT NULL,
"blob" BYTEA NOT NULL,
"state" BYTEA,
"expired_at" TIMESTAMPTZ(6) NOT NULL,
CONSTRAINT "snapshot_histories_pkey" PRIMARY KEY ("workspace_id","guid","timestamp")
);