mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-06 19:17:27 +02:00
🔥 Remove deprecated event model (#1775)
This commit is contained in:
parent
b1b76b4bec
commit
37b7ed5e19
14 changed files with 85 additions and 248 deletions
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `events` table. If the table is not empty, all the data it contains will be lost.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "events" DROP CONSTRAINT "events_user_id_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "polls" DROP CONSTRAINT "polls_event_id_fkey";
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "events";
|
|
@ -1,23 +1,3 @@
|
|||
/**
|
||||
* 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
|
||||
|
|
|
@ -39,7 +39,6 @@ model Poll {
|
|||
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[]
|
||||
|
|
|
@ -53,7 +53,6 @@ model User {
|
|||
comments Comment[]
|
||||
polls Poll[]
|
||||
watcher Watcher[]
|
||||
events Event[]
|
||||
accounts Account[]
|
||||
participants Participant[]
|
||||
paymentMethods PaymentMethod[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue