Skip to content

Commit f396bf2

Browse files
committed
feat: add dynamic config items table
1 parent 3d7ec5e commit f396bf2

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-- CreateTable
2+
CREATE TABLE "dynamic_config_items" (
3+
"id" UUID NOT NULL DEFAULT uuid_generate_v4(),
4+
"value" VARCHAR(50) NOT NULL,
5+
"type" VARCHAR(50) NOT NULL,
6+
7+
CONSTRAINT "dynamic_config_items_pkey" PRIMARY KEY ("id")
8+
);
9+
10+
-- CreateIndex
11+
CREATE INDEX "dynamic_config_items_value_idx" ON "dynamic_config_items"("value");
12+
13+
-- CreateIndex
14+
CREATE UNIQUE INDEX "dynamic_config_items_value_type_key" ON "dynamic_config_items"("value", "type");

packages/velog-prisma/prisma/schema.prisma

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,3 +640,13 @@ model Notification {
640640
@@index([fk_user_id])
641641
@@map("notifications")
642642
}
643+
644+
model DynamicConfigItem {
645+
id String @id @default(dbgenerated("uuid_generate_v4()")) @db.Uuid
646+
value String @db.VarChar(50)
647+
type String @db.VarChar(50)
648+
649+
@@unique([value, type])
650+
@@index([value])
651+
@@map("dynamic_config_items")
652+
}

0 commit comments

Comments
 (0)