show notice creators with admin avatars
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-10 11:11:32 +09:00
parent 609c345739
commit 6311f8a553
5 changed files with 86 additions and 8 deletions
+4
View File
@@ -19,10 +19,14 @@ model LauncherNotice {
startsAt DateTime? @map("starts_at") @db.Timestamptz(3)
endsAt DateTime? @map("ends_at") @db.Timestamptz(3)
priority Int @default(0)
createdById String? @map("created_by_id") @db.Uuid
createdByName String? @map("created_by_name")
createdByEmail String? @map("created_by_email")
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3)
updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamptz(3)
@@index([appKey, isActive, priority])
@@index([createdByEmail])
@@map("launcher_notices")
}
@@ -0,0 +1,16 @@
DO $$
BEGIN
IF to_regclass('public.launcher_notices') IS NOT NULL THEN
ALTER TABLE "launcher_notices"
ADD COLUMN IF NOT EXISTS "created_by_id" UUID,
ADD COLUMN IF NOT EXISTS "created_by_name" TEXT,
ADD COLUMN IF NOT EXISTS "created_by_email" TEXT;
END IF;
END $$;
DO $$
BEGIN
IF to_regclass('public.launcher_notices') IS NOT NULL THEN
CREATE INDEX IF NOT EXISTS "launcher_notices_created_by_email_idx" ON "launcher_notices"("created_by_email");
END IF;
END $$;