Skip to content

Commit 63d2bfe

Browse files
committed
add name column to share table
1 parent 8f55ed9 commit 63d2bfe

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

prisma/migrations/15_add_share/migration.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ CREATE TABLE "share" (
33
"share_id" UUID NOT NULL,
44
"entity_id" UUID NOT NULL,
55
"share_type" INTEGER NOT NULL,
6+
"name" VARCHAR(200) NOT NULL,
67
"slug" VARCHAR(100) NOT NULL,
78
"parameters" JSONB NOT NULL,
89
"created_at" TIMESTAMPTZ(6) DEFAULT CURRENT_TIMESTAMP,
@@ -21,9 +22,10 @@ CREATE UNIQUE INDEX "share_slug_key" ON "share"("slug");
2122
CREATE INDEX "share_entity_id_idx" ON "share"("entity_id");
2223

2324
-- MigrateData
24-
INSERT INTO "share" (share_id, entity_id, share_type, slug, parameters, created_at)
25+
INSERT INTO "share" (share_id, entity_id, name, share_type, slug, parameters, created_at)
2526
SELECT gen_random_uuid(),
2627
website_id,
28+
name,
2729
1,
2830
share_id,
2931
'{}'::jsonb,

prisma/schema.prisma

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ model Board {
342342
model Share {
343343
id String @id() @map("share_id") @db.Uuid
344344
entityId String @map("entity_id") @db.Uuid
345+
name String @db.VarChar(200)
345346
shareType Int @map("share_type") @db.Integer
346347
slug String @unique() @db.VarChar(100)
347348
parameters Json

0 commit comments

Comments
 (0)