Skip to content

Commit 6135620

Browse files
committed
add: usage_count and last_used_at columns to DynamicConfigItem table
1 parent de22fd6 commit 6135620

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- AlterTable
2+
ALTER TABLE "dynamic_config_items" ADD COLUMN "last_used_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
3+
ADD COLUMN "usage_count" INTEGER NOT NULL DEFAULT 0;

packages/velog-prisma/prisma/schema.prisma

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,11 @@ model Notification {
642642
}
643643

644644
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)
645+
id String @id @default(dbgenerated("uuid_generate_v4()")) @db.Uuid
646+
value String @db.VarChar(50)
647+
type String @db.VarChar(50)
648+
usage_count Int @default(0)
649+
last_used_at DateTime @default(now()) @db.Timestamptz(6)
648650
649651
@@unique([value, type])
650652
@@index([value])

0 commit comments

Comments
 (0)