Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🗃️ Upgrade prisma, split schema and add user role (#1722)
Luke Vella982fc39ac7ac
diff --git a/apps/landing/package.json b/apps/landing/package.jsonindex bbb73a24b..c51ca6518 100644--- a/apps/landing/package.json+++ b/apps/landing/package.json@@ -11,7 +11,7 @@"i18n:scan": "i18next-scanner --config i18next-scanner.config.js"},"dependencies": {- "@prisma/client": "^6.4.1",+ "@prisma/client": "^6.8.2","@rallly/billing": "workspace:*","@rallly/database": "workspace:*","@rallly/languages": "workspace:*",diff --git a/apps/web/package.json b/apps/web/package.jsonindex 0ea31e3c6..eb8811dac 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -24,7 +24,7 @@"@next/bundle-analyzer": "^15.3.1","@next/env": "^15.3.1","@panva/hkdf": "^1.2.1",- "@prisma/client": "^6.4.1",+ "@prisma/client": "^6.8.2","@radix-ui/react-radio-group": "^1.2.3","@radix-ui/react-select": "^2.2.2","@radix-ui/react-slot": "^1.1.2",diff --git a/package.json b/package.jsonindex d82c46cbf..4fc7797be 100644--- a/package.json+++ b/package.json@@ -31,14 +31,14 @@},"prisma": {"seed": "pnpm --filter @rallly/database db:seed",- "schema": "./packages/database/prisma/schema.prisma"+ "schema": "./packages/database/prisma"},"devDependencies": {"@biomejs/biome": "1.9.4","@playwright/test": "^1.52.0","dotenv-cli": "^8.0.0","prettier": "^3.5.3",- "prisma": "^6.4.1",+ "prisma": "^6.8.2","turbo": "^2.4.4","typescript": "^5.8.2","vitest": "^2.1.9"diff --git a/packages/database/package.json b/packages/database/package.jsonindex 9981954db..caadceadf 100644--- a/packages/database/package.json+++ b/packages/database/package.json@@ -12,14 +12,14 @@},"exports": "./index.ts","dependencies": {- "@prisma/client": "^6.4.1",+ "@prisma/client": "^6.8.2","dayjs": "^1.11.13"},"devDependencies": {"@faker-js/faker": "^7.6.0","@rallly/tsconfig": "workspace:*","@types/node": "^20.11.1",- "prisma": "^6.4.1",+ "prisma": "^6.8.2","tsx": "^4.6.2"}}diff --git a/packages/database/prisma/migrations/20250522093338_add_user_role/migration.sql b/packages/database/prisma/migrations/20250522093338_add_user_role/migration.sqlnew file mode 100644index 000000000..df2668957--- /dev/null+++ b/packages/database/prisma/migrations/20250522093338_add_user_role/migration.sql@@ -0,0 +1,5 @@+-- CreateEnum+CREATE TYPE "user_role" AS ENUM ('admin', 'user');++-- AlterTable+ALTER TABLE "users" ADD COLUMN "role" "user_role" NOT NULL DEFAULT 'user';diff --git a/packages/database/prisma/migrations/migration_lock.toml b/packages/database/prisma/migrations/migration_lock.tomlindex 648c57fd5..044d57cdb 100644--- a/packages/database/prisma/migrations/migration_lock.toml+++ b/packages/database/prisma/migrations/migration_lock.toml@@ -1,3 +1,3 @@# Please do not edit this file manually# It should be added in your version-control system (e.g., Git)-provider = "postgresql"\ No newline at end of file+provider = "postgresql"diff --git a/packages/database/prisma/models/billing.prisma b/packages/database/prisma/models/billing.prismanew file mode 100644index 000000000..e7024074f--- /dev/null+++ b/packages/database/prisma/models/billing.prisma@@ -0,0 +1,53 @@+model Subscription {+ id String @id+ priceId String @map("price_id")+ amount Int+ status SubscriptionStatus+ active Boolean+ currency String+ interval SubscriptionInterval+ createdAt DateTime @default(now()) @map("created_at")+ periodStart DateTime @map("period_start")+ periodEnd DateTime @map("period_end")+ cancelAtPeriodEnd Boolean @default(false) @map("cancel_at_period_end")+ userId String @unique @map("user_id")++ user User @relation("UserToSubscription", fields: [userId], references: [id], onDelete: Cascade)++ @@map("subscriptions")+}++enum SubscriptionStatus {+ incomplete+ incomplete_expired+ active+ paused+ trialing+ past_due+ canceled+ unpaid++ @@map("subscription_status")+}++enum SubscriptionInterval {+ day+ week+ month+ year++ @@map("subscription_interval")+}++model PaymentMethod {+ id String @id+ userId String @map("user_id")+ type String+ data Json+ createdAt DateTime @default(now()) @map("created_at")+ updatedAt DateTime @updatedAt @map("updated_at")++ user User @relation(fields: [userId], references: [id], onDelete: Cascade)++ @@map("payment_methods")+}diff --git a/packages/database/prisma/models/event.prisma b/packages/database/prisma/models/event.prismanew file mode 100644index 000000000..d16cfc6b7--- /dev/null+++ b/packages/database/prisma/models/event.prisma@@ -0,0 +1,95 @@+/**+ * Events are created when a user creates a new event+ * @deprecated+ */+model Event {+ id String @id @default(cuid())+ userId String @map("user_id")+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)+ optionId String @map("option_id")+ title String+ start DateTime @db.Timestamp(0)+ duration Int @default(0) @map("duration_minutes")+ createdAt DateTime @default(now()) @map("created_at")++ poll Poll?++ @@index([userId], type: Hash)+ @@map("events")+}++enum ScheduledEventStatus {+ confirmed+ canceled+ unconfirmed++ @@map("scheduled_event_status")+}++enum ScheduledEventInviteStatus {+ pending+ accepted+ declined+ tentative++ @@map("scheduled_event_invite_status")+}++model ScheduledEvent {+ id String @id @default(cuid())+ userId String @map("user_id")+ title String+ description String?+ location String?+ 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")++ user User @relation(fields: [userId], references: [id], onDelete: Cascade)+ rescheduledDates RescheduledEventDate[]+ invites ScheduledEventInvite[]+ polls Poll[]++ @@map("scheduled_events")+}++model RescheduledEventDate {+ id String @id @default(cuid())+ scheduledEventId String @map("scheduled_event_id")+ start DateTime @map("start")+ end DateTime @map("end")+ allDay Boolean @default(false) @map("all_day")+ createdAt DateTime @default(now()) @map("created_at")++ scheduledEvent ScheduledEvent @relation(fields: [scheduledEventId], references: [id], onDelete: Cascade)++ @@index([scheduledEventId])+ @@map("rescheduled_event_dates")+}++model ScheduledEventInvite {+ id String @id @default(cuid())+ scheduledEventId String @map("scheduled_event_id")+ inviteeName String @map("invitee_name")+ inviteeEmail String @map("invitee_email")+ inviteeId String? @map("invitee_id")+ inviteeTimeZone String? @map("invitee_time_zone")+ status ScheduledEventInviteStatus @default(pending)+ createdAt DateTime @default(now()) @map("created_at")+ updatedAt DateTime @updatedAt @map("updated_at")++ scheduledEvent ScheduledEvent @relation(fields: [scheduledEventId], references: [id], onDelete: Cascade)+ user User? @relation(fields: [inviteeId], references: [id], onDelete: SetNull) // Optional relation to User model++ @@unique([scheduledEventId, inviteeEmail])+ @@unique([scheduledEventId, inviteeId])+ @@index([scheduledEventId])+ @@index([inviteeId])+ @@index([inviteeEmail])+ @@map("scheduled_event_invites")+}diff --git a/packages/database/prisma/models/poll.prisma b/packages/database/prisma/models/poll.prismanew file mode 100644index 000000000..77d7ac93e--- /dev/null+++ b/packages/database/prisma/models/poll.prisma@@ -0,0 +1,166 @@+enum ParticipantVisibility {+ full+ scoresOnly+ limited++ @@map("participant_visibility")+}++enum PollStatus {+ live+ paused+ finalized++ @@map("poll_status")+}++model Poll {+ id String @id @unique @map("id")+ createdAt DateTime @default(now()) @map("created_at")+ updatedAt DateTime @updatedAt @map("updated_at")+ deadline DateTime?+ title String+ description String?+ location String?+ userId String? @map("user_id")+ guestId String? @map("guest_id")+ timeZone String? @map("time_zone")+ status PollStatus @default(live)+ deleted Boolean @default(false)+ deletedAt DateTime? @map("deleted_at")+ touchedAt DateTime @default(now()) @map("touched_at") // @deprecated+ participantUrlId String @unique @map("participant_url_id")+ adminUrlId String @unique @map("admin_url_id")+ eventId String? @unique @map("event_id")+ scheduledEventId String? @map("scheduled_event_id")+ hideParticipants Boolean @default(false) @map("hide_participants")+ hideScores Boolean @default(false) @map("hide_scores")+ disableComments Boolean @default(false) @map("disable_comments")+ requireParticipantEmail Boolean @default(false) @map("require_participant_email")++ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)+ event Event? @relation(fields: [eventId], references: [id], onDelete: SetNull)+ scheduledEvent ScheduledEvent? @relation(fields: [scheduledEventId], references: [id], onDelete: SetNull)+ options Option[]+ participants Participant[]+ watchers Watcher[]+ comments Comment[]+ votes Vote[]+ views PollView[]++ @@index([guestId])+ @@map("polls")+}++model Watcher {+ id Int @id @default(autoincrement())+ userId String @map("user_id")+ pollId String @map("poll_id")+ createdAt DateTime @default(now()) @map("created_at")++ poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)++ @@index([pollId], type: Hash)+ @@map("watchers")+}++model Participant {+ id String @id @default(cuid())+ name String+ email String?+ userId String? @map("user_id")+ guestId String? @map("guest_id")+ pollId String @map("poll_id")+ locale String?+ createdAt DateTime @default(now()) @map("created_at")+ updatedAt DateTime? @updatedAt @map("updated_at")+ deleted Boolean @default(false)+ deletedAt DateTime? @map("deleted_at")++ votes Vote[]++ poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)+ user User? @relation(fields: [userId], references: [id], onDelete: SetNull)++ @@index([guestId], type: Hash)+ @@index([pollId], type: Hash)+ @@map("participants")+}++model Option {+ id String @id @default(cuid())+ startTime DateTime @map("start_time") @db.Timestamp(0)+ duration Int @default(0) @map("duration_minutes")+ pollId String @map("poll_id")+ createdAt DateTime @default(now()) @map("created_at")++ votes Vote[]++ poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)++ @@index([pollId], type: Hash)+ @@map("options")+}++enum VoteType {+ yes+ no+ ifNeedBe++ @@map("vote_type")+}++model Vote {+ id String @id @default(cuid())+ participantId String @map("participant_id")+ optionId String @map("option_id")+ pollId String @map("poll_id")+ type VoteType @default(yes)+ createdAt DateTime @default(now()) @map("created_at")+ updatedAt DateTime? @updatedAt @map("updated_at")++ participant Participant @relation(fields: [participantId], references: [id], onDelete: Cascade)+ option Option @relation(fields: [optionId], references: [id], onDelete: Cascade)+ poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)++ @@index([pollId], type: Hash)+ @@index([participantId], type: Hash)+ @@index([optionId], type: Hash)+ @@map("votes")+}++model Comment {+ id String @id @default(cuid())+ content String+ pollId String @map("poll_id")+ authorName String @map("author_name")+ userId String? @map("user_id")+ guestId String? @map("guest_id")+ createdAt DateTime @default(now()) @map("created_at")+ updatedAt DateTime? @updatedAt @map("updated_at")++ poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)++ @@index([guestId], type: Hash)+ @@index([pollId], type: Hash)+ @@map("comments")+}++model PollView {+ id String @id @default(cuid())+ pollId String @map("poll_id")+ ipAddress String? @map("ip_address")+ userId String? @map("user_id")+ userAgent String? @map("user_agent")+ viewedAt DateTime @default(now()) @map("viewed_at")++ poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)+ user User? @relation(fields: [userId], references: [id], onDelete: SetNull)++ @@index([pollId], type: Hash)+ @@index([userId], type: Hash)+ @@index([viewedAt])+ @@map("poll_views")+}diff --git a/packages/database/prisma/models/user.prisma b/packages/database/prisma/models/user.prismanew file mode 100644index 000000000..7859c65b8--- /dev/null+++ b/packages/database/prisma/models/user.prisma@@ -0,0 +1,75 @@+enum TimeFormat {+ hours12+ hours24++ @@map("time_format")+}++model Account {+ id String @id @default(cuid())+ userId String @map("user_id")+ type String+ provider String+ providerAccountId String @map("provider_account_id")+ refresh_token String? @db.Text+ access_token String? @db.Text+ expires_at Int?+ token_type String?+ scope String?+ id_token String? @db.Text+ session_state String?++ user User @relation(fields: [userId], references: [id], onDelete: Cascade)++ @@unique([provider, providerAccountId])+ @@map("accounts")+}++enum UserRole {+ admin+ user++ @@map("user_role")+}++model User {+ id String @id @default(cuid())+ name String+ email String @unique() @db.Citext+ emailVerified DateTime? @map("email_verified")+ image String?+ timeZone String? @map("time_zone")+ weekStart Int? @map("week_start")+ timeFormat TimeFormat? @map("time_format")+ locale String?+ createdAt DateTime @default(now()) @map("created_at")+ updatedAt DateTime? @updatedAt @map("updated_at")+ customerId String? @map("customer_id")+ banned Boolean @default(false)+ bannedAt DateTime? @map("banned_at")+ banReason String? @map("ban_reason")+ role UserRole @default(user)++ comments Comment[]+ polls Poll[]+ watcher Watcher[]+ events Event[]+ accounts Account[]+ participants Participant[]+ paymentMethods PaymentMethod[]+ subscription Subscription? @relation("UserToSubscription")+ pollViews PollView[]+ scheduledEvents ScheduledEvent[]+ scheduledEventInvites ScheduledEventInvite[]++ @@map("users")+}++model VerificationToken {+ identifier String @db.Citext+ token String @unique+ expires DateTime++ @@unique([identifier, token])+ @@map("verification_tokens")+}diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prismaindex a04fd812f..c7b66a06a 100644--- a/packages/database/prisma/schema.prisma+++ b/packages/database/prisma/schema.prisma@@ -9,384 +9,3 @@ generator client {binaryTargets = ["native"]previewFeatures = ["relationJoins"]}--enum TimeFormat {- hours12- hours24-- @@map("time_format")-}--model Account {- id String @id @default(cuid())- userId String @map("user_id")- type String- provider String- providerAccountId String @map("provider_account_id")- refresh_token String? @db.Text- access_token String? @db.Text- expires_at Int?- token_type String?- scope String?- id_token String? @db.Text- session_state String?-- user User @relation(fields: [userId], references: [id], onDelete: Cascade)-- @@unique([provider, providerAccountId])- @@map("accounts")-}--model User {- id String @id @default(cuid())- name String- email String @unique() @db.Citext- emailVerified DateTime? @map("email_verified")- image String?- timeZone String? @map("time_zone")- weekStart Int? @map("week_start")- timeFormat TimeFormat? @map("time_format")- locale String?- createdAt DateTime @default(now()) @map("created_at")- updatedAt DateTime? @updatedAt @map("updated_at")- customerId String? @map("customer_id")- banned Boolean @default(false)- bannedAt DateTime? @map("banned_at")- banReason String? @map("ban_reason")-- comments Comment[]- polls Poll[]- watcher Watcher[]- events Event[]- accounts Account[]- participants Participant[]- paymentMethods PaymentMethod[]- subscription Subscription? @relation("UserToSubscription")- pollViews PollView[]- scheduledEvents ScheduledEvent[]- scheduledEventInvites ScheduledEventInvite[]-- @@map("users")-}--enum SubscriptionStatus {- incomplete- incomplete_expired- active- paused- trialing- past_due- canceled- unpaid-- @@map("subscription_status")-}--enum SubscriptionInterval {- day- week- month- year-- @@map("subscription_interval")-}--model PaymentMethod {- id String @id- userId String @map("user_id")- type String- data Json- createdAt DateTime @default(now()) @map("created_at")- updatedAt DateTime @updatedAt @map("updated_at")-- user User @relation(fields: [userId], references: [id], onDelete: Cascade)-- @@map("payment_methods")-}--model Subscription {- id String @id- priceId String @map("price_id")- amount Int- status SubscriptionStatus- active Boolean- currency String- interval SubscriptionInterval- createdAt DateTime @default(now()) @map("created_at")- periodStart DateTime @map("period_start")- periodEnd DateTime @map("period_end")- cancelAtPeriodEnd Boolean @default(false) @map("cancel_at_period_end")- userId String @unique @map("user_id")-- user User @relation("UserToSubscription", fields: [userId], references: [id], onDelete: Cascade)-- @@map("subscriptions")-}--enum ParticipantVisibility {- full- scoresOnly- limited-- @@map("participant_visibility")-}--enum PollStatus {- live- paused- finalized-- @@map("poll_status")-}--model Poll {- id String @id @unique @map("id")- createdAt DateTime @default(now()) @map("created_at")- updatedAt DateTime @updatedAt @map("updated_at")- deadline DateTime?- title String- description String?- location String?- userId String? @map("user_id")- guestId String? @map("guest_id")- timeZone String? @map("time_zone")- status PollStatus @default(live)- deleted Boolean @default(false)- deletedAt DateTime? @map("deleted_at")- touchedAt DateTime @default(now()) @map("touched_at") // @deprecated- participantUrlId String @unique @map("participant_url_id")- adminUrlId String @unique @map("admin_url_id")- eventId String? @unique @map("event_id")- scheduledEventId String? @map("scheduled_event_id")- hideParticipants Boolean @default(false) @map("hide_participants")- hideScores Boolean @default(false) @map("hide_scores")- disableComments Boolean @default(false) @map("disable_comments")- requireParticipantEmail Boolean @default(false) @map("require_participant_email")-- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)- event Event? @relation(fields: [eventId], references: [id], onDelete: SetNull)- scheduledEvent ScheduledEvent? @relation(fields: [scheduledEventId], references: [id], onDelete: SetNull)- options Option[]- participants Participant[]- watchers Watcher[]- comments Comment[]- votes Vote[]- views PollView[]-- @@index([guestId])- @@map("polls")-}--model Event {- id String @id @default(cuid())- userId String @map("user_id")- user User @relation(fields: [userId], references: [id], onDelete: Cascade)- optionId String @map("option_id")- title String- start DateTime @db.Timestamp(0)- duration Int @default(0) @map("duration_minutes")- createdAt DateTime @default(now()) @map("created_at")-- poll Poll?-- @@index([userId], type: Hash)- @@map("events")-}--model Watcher {- id Int @id @default(autoincrement())- userId String @map("user_id")- pollId String @map("poll_id")- createdAt DateTime @default(now()) @map("created_at")-- poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)- user User @relation(fields: [userId], references: [id], onDelete: Cascade)-- @@index([pollId], type: Hash)- @@map("watchers")-}--model Participant {- id String @id @default(cuid())- name String- email String?- userId String? @map("user_id")- guestId String? @map("guest_id")- pollId String @map("poll_id")- locale String?- createdAt DateTime @default(now()) @map("created_at")- updatedAt DateTime? @updatedAt @map("updated_at")- deleted Boolean @default(false)- deletedAt DateTime? @map("deleted_at")-- votes Vote[]-- poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)- user User? @relation(fields: [userId], references: [id], onDelete: SetNull)-- @@index([guestId], type: Hash)- @@index([pollId], type: Hash)- @@map("participants")-}--model Option {- id String @id @default(cuid())- startTime DateTime @map("start_time") @db.Timestamp(0)- duration Int @default(0) @map("duration_minutes")- pollId String @map("poll_id")- createdAt DateTime @default(now()) @map("created_at")-- votes Vote[]-- poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)-- @@index([pollId], type: Hash)- @@map("options")-}--enum VoteType {- yes- no- ifNeedBe-- @@map("vote_type")-}--model Vote {- id String @id @default(cuid())- participantId String @map("participant_id")- optionId String @map("option_id")- pollId String @map("poll_id")- type VoteType @default(yes)- createdAt DateTime @default(now()) @map("created_at")- updatedAt DateTime? @updatedAt @map("updated_at")-- participant Participant @relation(fields: [participantId], references: [id], onDelete: Cascade)- option Option @relation(fields: [optionId], references: [id], onDelete: Cascade)- poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)-- @@index([pollId], type: Hash)- @@index([participantId], type: Hash)- @@index([optionId], type: Hash)- @@map("votes")-}--model Comment {- id String @id @default(cuid())- content String- pollId String @map("poll_id")- authorName String @map("author_name")- userId String? @map("user_id")- guestId String? @map("guest_id")- createdAt DateTime @default(now()) @map("created_at")- updatedAt DateTime? @updatedAt @map("updated_at")-- poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)-- @@index([guestId], type: Hash)- @@index([pollId], type: Hash)- @@map("comments")-}--model PollView {- id String @id @default(cuid())- pollId String @map("poll_id")- ipAddress String? @map("ip_address")- userId String? @map("user_id")- userAgent String? @map("user_agent")- viewedAt DateTime @default(now()) @map("viewed_at")-- poll Poll @relation(fields: [pollId], references: [id], onDelete: Cascade)- user User? @relation(fields: [userId], references: [id], onDelete: SetNull)-- @@index([pollId], type: Hash)- @@index([userId], type: Hash)- @@index([viewedAt])- @@map("poll_views")-}--model VerificationToken {- identifier String @db.Citext- token String @unique- expires DateTime-- @@unique([identifier, token])- @@map("verification_tokens")-}--enum ScheduledEventStatus {- confirmed- canceled- unconfirmed-- @@map("scheduled_event_status")-}--enum ScheduledEventInviteStatus {- pending- accepted- declined- tentative-- @@map("scheduled_event_invite_status")-}--model ScheduledEvent {- id String @id @default(cuid())- userId String @map("user_id")- title String- description String?- location String?- 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")-- user User @relation(fields: [userId], references: [id], onDelete: Cascade)- rescheduledDates RescheduledEventDate[]- invites ScheduledEventInvite[]- polls Poll[]-- @@map("scheduled_events")-}--model RescheduledEventDate {- id String @id @default(cuid())- scheduledEventId String @map("scheduled_event_id")- start DateTime @map("start")- end DateTime @map("end")- allDay Boolean @default(false) @map("all_day")- createdAt DateTime @default(now()) @map("created_at")-- scheduledEvent ScheduledEvent @relation(fields: [scheduledEventId], references: [id], onDelete: Cascade)-- @@index([scheduledEventId])- @@map("rescheduled_event_dates")-}--model ScheduledEventInvite {- id String @id @default(cuid())- scheduledEventId String @map("scheduled_event_id")- inviteeName String @map("invitee_name")- inviteeEmail String @map("invitee_email")- inviteeId String? @map("invitee_id")- inviteeTimeZone String? @map("invitee_time_zone")- status ScheduledEventInviteStatus @default(pending)- createdAt DateTime @default(now()) @map("created_at")- updatedAt DateTime @updatedAt @map("updated_at")-- scheduledEvent ScheduledEvent @relation(fields: [scheduledEventId], references: [id], onDelete: Cascade)- user User? @relation(fields: [inviteeId], references: [id], onDelete: SetNull) // Optional relation to User model-- @@unique([scheduledEventId, inviteeEmail])- @@unique([scheduledEventId, inviteeId])- @@index([scheduledEventId])- @@index([inviteeId])- @@index([inviteeEmail])- @@map("scheduled_event_invites")-}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 9bc2bac35..43f0e599b 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -21,8 +21,8 @@ importers:specifier: ^3.5.3version: 3.5.3prisma:- specifier: ^6.4.1- version: 6.6.0([email protected])+ specifier: ^6.8.2+ version: 6.8.2([email protected])turbo:specifier: ^2.4.4version: 2.5.2@@ -42,8 +42,8 @@ importers:apps/landing:dependencies:'@prisma/client':- specifier: ^6.4.1+ specifier: ^6.8.2'@rallly/billing':specifier: workspace:*version: link:../../packages/billing@@ -155,7 +155,7 @@ importers:version: 1.3.20([email protected])'@auth/prisma-adapter':specifier: ^2.7.4- version: 2.9.0(@prisma/[email protected]([email protected]([email protected]))([email protected]))([email protected])+ version: 2.9.0(@prisma/[email protected]([email protected]([email protected]))([email protected]))([email protected])'@aws-sdk/client-s3':specifier: ^3.645.0version: 3.797.0@@ -175,8 +175,8 @@ importers:specifier: ^1.2.1version: 1.2.1'@prisma/client':- specifier: ^6.4.1+ specifier: ^6.8.2'@radix-ui/react-radio-group':specifier: ^1.2.3version: 1.3.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])@@ -453,8 +453,8 @@ importers:packages/database:dependencies:'@prisma/client':- specifier: ^6.4.1+ specifier: ^6.8.2dayjs:specifier: ^1.11.13version: 1.11.13@@ -469,8 +469,8 @@ importers:specifier: ^20.11.1version: 20.17.50prisma:- specifier: ^6.4.1- version: 6.6.0([email protected])+ specifier: ^6.8.2+ version: 6.8.2([email protected])tsx:specifier: ^4.6.2version: 4.19.3@@ -2620,8 +2620,8 @@ packages:'@popperjs/[email protected]':resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}- '@prisma/[email protected]':- resolution: {integrity: sha512-vfp73YT/BHsWWOAuthKQ/1lBgESSqYqAWZEYyTdGXyFAHpmewwWL2Iz6ErIzkj4aHbuc6/cGSsE6ZY+pBO04Cg==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-5II+vbyzv4si6Yunwgkj0qT/iY0zyspttoDrL3R4BYgLdp42/d2C8xdi9vqkrYtKt9H32oFIukvyw3Koz5JoDg==}engines: {node: '>=18.18'}peerDependencies:prisma: '*'@@ -2632,23 +2632,23 @@ packages:typescript:optional: true- '@prisma/[email protected]':- resolution: {integrity: sha512-d8FlXRHsx72RbN8nA2QCRORNv5AcUnPXgtPvwhXmYkQSMF/j9cKaJg+9VcUzBRXGy9QBckNzEQDEJZdEOZ+ubA==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-ZJY1fF4qRBPdLQ/60wxNtX+eu89c3AkYEcP7L3jkp0IPXCNphCYxikTg55kPJLDOG6P0X+QG5tCv6CmsBRZWFQ==}- '@prisma/[email protected]':- resolution: {integrity: sha512-DL6n4IKlW5k2LEXzpN60SQ1kP/F6fqaCgU/McgaYsxSf43GZ8lwtmXLke9efS+L1uGmrhtBUP4npV/QKF8s2ZQ==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-4muBSSUwJJ9BYth5N8tqts8JtiLT8QI/RSAzEogwEfpbYGFo9mYsInsVo8dqXdPO2+Rm5OG5q0qWDDE3nyUbVg==}- '@prisma/engines-version@6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a':- resolution: {integrity: sha512-JzRaQ5Em1fuEcbR3nUsMNYaIYrOT1iMheenjCvzZblJcjv/3JIuxXN7RCNT5i6lRkLodW5ojCGhR7n5yvnNKrw==}+ '@prisma/engines-version@6.8.0-43.2060c79ba17c6bb9f5823312b6f6b7f4a845738e':+ resolution: {integrity: sha512-Rkik9lMyHpFNGaLpPF3H5q5TQTkm/aE7DsGM5m92FZTvWQsvmi6Va8On3pWvqLHOt5aPUvFb/FeZTmphI4CPiQ==}- '@prisma/[email protected]':- resolution: {integrity: sha512-nC0IV4NHh7500cozD1fBoTwTD1ydJERndreIjpZr/S3mno3P6tm8qnXmIND5SwUkibNeSJMpgl4gAnlqJ/gVlg==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-XqAJ//LXjqYRQ1RRabs79KOY4+v6gZOGzbcwDQl0D6n9WBKjV7qdrbd042CwSK0v0lM9MSHsbcFnU2Yn7z8Zlw==}- '@prisma/[email protected]':- resolution: {integrity: sha512-Ohfo8gKp05LFLZaBlPUApM0M7k43a0jmo86YY35u1/4t+vuQH9mRGU7jGwVzGFY3v+9edeb/cowb1oG4buM1yw==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-lCvikWOgaLOfqXGacEKSNeenvj0n3qR5QvZUOmPE2e1Eh8cMYSobxonCg9rqM6FSdTfbpqp9xwhSAOYfNqSW0g==}- '@prisma/[email protected]':- resolution: {integrity: sha512-3qCwmnT4Jh5WCGUrkWcc6VZaw0JY7eWN175/pcb5Z6FiLZZ3ygY93UX0WuV41bG51a6JN/oBH0uywJ90Y+V5eA==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-vXSxyUgX3vm1Q70QwzwkjeYfRryIvKno1SXbIqwSptKwqKzskINnDUcx85oX+ys6ooN2ATGSD0xN2UTfg6Zcow==}'@prisma/[email protected]':resolution: {integrity: sha512-M/a6njz3hbf2oucwdbjNKrSMLuyMCwgDrmTtkF1pm4Nm7CU45J/Hd6lauF2CDACTUYzu3ymcV7P0ZAhIoj6WRw==}@@ -4999,11 +4999,6 @@ packages:resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==}- resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==}- peerDependencies:- esbuild: '>=0.12 <1'-resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}engines: {node: '>=12'}@@ -5517,6 +5512,10 @@ packages:resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==}hasBin: true+ resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==}+ hasBin: true+resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==}@@ -6261,8 +6260,8 @@ packages:engines: {node: '>=14'}hasBin: true- resolution: {integrity: sha512-SYCUykz+1cnl6Ugd8VUvtTQq5+j1Q7C0CtzKPjQ8JyA2ALh0EEJkMCS+KgdnvKW1lrxjtjCyJSHOOT236mENYg==}+ resolution: {integrity: sha512-JNricTXQxzDtRS7lCGGOB4g5DJ91eg3nozdubXze3LpcMl1oWwcFddrj++Up3jnRE6X/3gB/xz3V+ecBk/eEGA==}engines: {node: '>=18.18'}hasBin: truepeerDependencies:@@ -7401,10 +7400,10 @@ snapshots:optionalDependencies:nodemailer: 6.10.1- '@auth/[email protected](@prisma/[email protected]([email protected]([email protected]))([email protected]))([email protected])':+ '@auth/[email protected](@prisma/[email protected]([email protected]([email protected]))([email protected]))([email protected])':dependencies:'@auth/core': 0.39.0([email protected])transitivePeerDependencies:- '@simplewebauthn/browser'- '@simplewebauthn/server'@@ -9551,38 +9550,35 @@ snapshots:'@popperjs/[email protected]': {}optionalDependencies:- prisma: 6.6.0([email protected])+ prisma: 6.8.2([email protected])typescript: 5.8.3- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- esbuild: 0.25.3- esbuild-register: 3.6.0([email protected])- transitivePeerDependencies:- - supports-color+ jiti: 2.4.2- '@prisma/[email protected]': {}+ '@prisma/[email protected]': {}- '@prisma/engines-version@6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a': {}+ '@prisma/engines-version@6.8.0-43.2060c79ba17c6bb9f5823312b6f6b7f4a845738e': {}- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- '@prisma/debug': 6.6.0- '@prisma/engines-version': 6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a- '@prisma/fetch-engine': 6.6.0- '@prisma/get-platform': 6.6.0+ '@prisma/debug': 6.8.2+ '@prisma/engines-version': 6.8.0-43.2060c79ba17c6bb9f5823312b6f6b7f4a845738e+ '@prisma/fetch-engine': 6.8.2+ '@prisma/get-platform': 6.8.2- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- '@prisma/debug': 6.6.0- '@prisma/engines-version': 6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a- '@prisma/get-platform': 6.6.0+ '@prisma/debug': 6.8.2+ '@prisma/engines-version': 6.8.0-43.2060c79ba17c6bb9f5823312b6f6b7f4a845738e+ '@prisma/get-platform': 6.8.2- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- '@prisma/debug': 6.6.0+ '@prisma/debug': 6.8.2'@prisma/[email protected](@opentelemetry/[email protected])':dependencies:@@ -12083,13 +12079,6 @@ snapshots:esast-util-from-estree: 2.0.0vfile-message: 4.0.2- dependencies:- debug: 4.4.0- esbuild: 0.25.3- transitivePeerDependencies:- - supports-color-optionalDependencies:'@esbuild/aix-ppc64': 0.21.5@@ -12720,6 +12709,8 @@ snapshots:+ [email protected]: {}+@@ -13567,15 +13558,12 @@ snapshots:dependencies:- '@prisma/config': 6.6.0- '@prisma/engines': 6.6.0+ '@prisma/config': 6.8.2+ '@prisma/engines': 6.8.2optionalDependencies:- fsevents: 2.3.3typescript: 5.8.3- transitivePeerDependencies:- - supports-colordiff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex e9b0dad63..7d66c74c9 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -1,3 +1,6 @@packages:- - 'apps/*'- - 'packages/*'+ - apps/*+ - packages/*++onlyBuiltDependencies:+ - '@prisma/client'