Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

✨ Add hideAttendees field to ScheduledEvent (RAL-1200) (#2397)

Luke Vella95f90c8905f1
diff --git a/apps/web/src/trpc/routers/polls.ts b/apps/web/src/trpc/routers/polls.ts
index 2d5fea313..5c8d95140 100644
--- a/apps/web/src/trpc/routers/polls.ts
+++ b/apps/web/src/trpc/routers/polls.ts
@@ -713,6 +713,7 @@ export const polls = router({
location: true,
description: true,
spaceId: true,
+ hideParticipants: true,
space: {
select: {
showBranding: true,
@@ -846,6 +847,7 @@ export const polls = router({
spaceId,
allDay: option.duration === 0,
status: "confirmed",
+ hideAttendees: poll.hideParticipants,
invites: {
createMany: {
data: poll.participants
diff --git a/packages/database/prisma/migrations/20260519160226_add_hide_attendees_to_scheduled_event/migration.sql b/packages/database/prisma/migrations/20260519160226_add_hide_attendees_to_scheduled_event/migration.sql
new file mode 100644
index 000000000..02ebb806a
--- /dev/null
+++ b/packages/database/prisma/migrations/20260519160226_add_hide_attendees_to_scheduled_event/migration.sql
@@ -0,0 +1,13 @@
+-- AlterTable
+ALTER TABLE "scheduled_events" ADD COLUMN "hide_attendees" BOOLEAN NOT NULL DEFAULT false;
+
+-- Backfill: inherit hideAttendees from the source poll's hideParticipants
+-- (events created from a poll that had hideParticipants = true)
+UPDATE "scheduled_events" se
+SET "hide_attendees" = true
+WHERE EXISTS (
+ SELECT 1
+ FROM "polls" p
+ WHERE p."scheduled_event_id" = se."id"
+ AND p."hide_participants" = true
+);
diff --git a/packages/database/prisma/models/event.prisma b/packages/database/prisma/models/event.prisma
index 3904b20a7..d93614b44 100644
--- a/packages/database/prisma/models/event.prisma
+++ b/packages/database/prisma/models/event.prisma
@@ -16,25 +16,26 @@ enum ScheduledEventInviteStatus {
}
model ScheduledEvent {
- id String @id @default(cuid())
- userId String @map("user_id")
- spaceId String @map("space_id")
- eventTypeId String? @map("event_type_id")
- sheetSlotId String? @unique @map("sheet_slot_id")
- title String
- description String?
- location String?
- capacity Int?
- createdAt DateTime @default(now()) @map("created_at")
- updatedAt DateTime @updatedAt @map("updated_at")
- status ScheduledEventStatus @default(confirmed)
- timeZone String? @map("time_zone")
- start DateTime
- end DateTime
- allDay Boolean @default(false) @map("all_day")
- deletedAt DateTime? @map("deleted_at")
- sequence Int @default(0)
- uid String @unique
+ id String @id @default(cuid())
+ userId String @map("user_id")
+ spaceId String @map("space_id")
+ eventTypeId String? @map("event_type_id")
+ sheetSlotId String? @unique @map("sheet_slot_id")
+ title String
+ description String?
+ location String?
+ capacity Int?
+ createdAt DateTime @default(now()) @map("created_at")
+ updatedAt DateTime @updatedAt @map("updated_at")
+ status ScheduledEventStatus @default(confirmed)
+ timeZone String? @map("time_zone")
+ start DateTime
+ end DateTime
+ allDay Boolean @default(false) @map("all_day")
+ deletedAt DateTime? @map("deleted_at")
+ sequence Int @default(0)
+ uid String @unique
+ hideAttendees Boolean @default(false) @map("hide_attendees")
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
space Space @relation(fields: [spaceId], references: [id], onDelete: Cascade)