feat: now support make any record starred

This commit is contained in:
2025-07-02 21:39:41 +08:00
parent 6e2976e234
commit acde78f4a0
8 changed files with 618 additions and 129 deletions
@@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "records" ADD COLUMN "isStarred" BOOLEAN NOT NULL DEFAULT false;
-- CreateIndex
CREATE INDEX "records_isStarred_idx" ON "records"("isStarred");
+3 -1
View File
@@ -31,6 +31,7 @@ model Record {
id String @id @default(cuid())
hostname String
timestamp DateTime @default(now())
isStarred Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -41,6 +42,7 @@ model Record {
@@index([hostname, timestamp])
@@index([timestamp])
@@index([isStarred])
@@map("records")
}
@@ -49,7 +51,7 @@ model Window {
recordId String
title String
path String
memory Int
memory BigInt
// Relations
record Record @relation(fields: [recordId], references: [id], onDelete: Cascade)