Skip to content

Commit 5b07bd1

Browse files
authored
chore: FeatureFlag add createdAt and updatedAt (#2880)
It’s useful to know when they were modified for debugging and auditing. For existing rows createdAt and updatedAt are set to now() during the migration, to avoid a nullable column.
1 parent 260fb7c commit 5b07bd1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- AlterTable
2+
ALTER TABLE "public"."FeatureFlag" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
3+
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
4+

internal-packages/database/prisma/schema.prisma

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,9 @@ model FeatureFlag {
11441144
11451145
key String @unique
11461146
value Json?
1147+
1148+
createdAt DateTime @default(now())
1149+
updatedAt DateTime @updatedAt
11471150
}
11481151

11491152
model WorkerInstance {

0 commit comments

Comments
 (0)