Add createdAt to license keys

This commit is contained in:
NeilClack
2026-09-10 13:11:34 -05:00
parent 4a1777de87
commit f50eb34769
7 changed files with 52 additions and 11 deletions
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "LicenseKey" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
+8 -7
View File
@@ -195,15 +195,16 @@ model ProclamationCategorySubscriptionLevelLegacy {
}
model LicenseKey {
id String @id @default(uuid())
key String @unique
active Boolean
userId String?
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
email String?
id String @id @default(uuid())
key String @unique
active Boolean
createdAt DateTime @default(now())
userId String?
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
email String?
// Legacy subscription level. Retained in the database but unmanaged; hidden
// from the client and left NULL.
level String? @ignore
level String? @ignore
@@index([userId])
@@index([email])