api: add date column for triggers
Parents:
39476e32 file(s) changed
- api/prisma/migrations/20260529013012_add_moment_to_trigger/migration.sql +2 -0
- api/prisma/schema.prisma +1 -0
api/prisma/migrations/20260529013012_add_moment_to_trigger/migration.sql
@@ -0,0 +1,2 @@
1 + -- AlterTable
2 + ALTER TABLE "triggers" ADD COLUMN "moment" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
api/prisma/schema.prisma
@@ -74,6 +74,7 @@ model Trigger {
74 74 id Int @id @default(autoincrement())
75 75 comment String? @db.Text
76 76 category TriggerType
77 + moment DateTime @default(now())
77 78
78 79 userId Int @map("user_id")
79 80 user User @relation(fields: [userId], references: [id])