fix share data migration to '{"overview":true}'
Some checks are pending
Node.js CI / build (push) Waiting to run

This commit is contained in:
Francis Cao 2026-01-22 19:52:55 -08:00
parent 7a89bbf19f
commit d70152be38
3 changed files with 2 additions and 14 deletions

View file

@ -2,8 +2,8 @@
CREATE TABLE "share" ( CREATE TABLE "share" (
"share_id" UUID NOT NULL, "share_id" UUID NOT NULL,
"entity_id" UUID NOT NULL, "entity_id" UUID NOT NULL,
"share_type" INTEGER NOT NULL,
"name" VARCHAR(200) NOT NULL, "name" VARCHAR(200) NOT NULL,
"share_type" INTEGER NOT NULL,
"slug" VARCHAR(100) NOT NULL, "slug" VARCHAR(100) NOT NULL,
"parameters" JSONB NOT NULL, "parameters" JSONB NOT NULL,
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP, "created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
@ -12,9 +12,6 @@ CREATE TABLE "share" (
CONSTRAINT "share_pkey" PRIMARY KEY ("share_id") CONSTRAINT "share_pkey" PRIMARY KEY ("share_id")
); );
-- CreateIndex
CREATE UNIQUE INDEX "share_share_id_key" ON "share"("share_id");
-- CreateIndex -- CreateIndex
CREATE UNIQUE INDEX "share_slug_key" ON "share"("slug"); CREATE UNIQUE INDEX "share_slug_key" ON "share"("slug");
@ -28,7 +25,7 @@ SELECT gen_random_uuid(),
name, name,
1, 1,
share_id, share_id,
'{}'::jsonb, '{"overview":true}'::jsonb,
now() now()
FROM "website" FROM "website"
WHERE share_id IS NOT NULL; WHERE share_id IS NOT NULL;

View file

@ -14,9 +14,6 @@ CREATE TABLE "board" (
CONSTRAINT "board_pkey" PRIMARY KEY ("board_id") CONSTRAINT "board_pkey" PRIMARY KEY ("board_id")
); );
-- CreateIndex
CREATE UNIQUE INDEX "board_board_id_key" ON "board"("board_id");
-- CreateIndex -- CreateIndex
CREATE UNIQUE INDEX "board_slug_key" ON "board"("slug"); CREATE UNIQUE INDEX "board_slug_key" ON "board"("slug");

View file

@ -1,6 +1,3 @@
-- DropIndex
DROP INDEX "board_board_id_key";
-- DropIndex -- DropIndex
DROP INDEX "link_link_id_key"; DROP INDEX "link_link_id_key";
@ -19,9 +16,6 @@ DROP INDEX "segment_segment_id_key";
-- DropIndex -- DropIndex
DROP INDEX "session_session_id_key"; DROP INDEX "session_session_id_key";
-- DropIndex
DROP INDEX "share_share_id_key";
-- DropIndex -- DropIndex
DROP INDEX "team_team_id_key"; DROP INDEX "team_team_id_key";