fiddle on schema

This commit is contained in:
Thomas Ruoff
2022-10-11 23:08:13 +02:00
parent f565c03d22
commit 5172f391ff
2 changed files with 11 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
-- AlterTable
ALTER TABLE "Bill" ALTER COLUMN "createdAt" SET DATA TYPE TIMESTAMP(3),
ALTER COLUMN "updatedAt" SET DATA TYPE TIMESTAMP(3);
-- AlterTable
ALTER TABLE "Booking" ALTER COLUMN "createdAt" SET DATA TYPE TIMESTAMP(3),
ALTER COLUMN "updatedAt" SET DATA TYPE TIMESTAMP(3);

View File

@@ -22,8 +22,8 @@ enum BillStatus {
model Bill {
id Int @id @default(autoincrement())
createdAt DateTime @default(now()) @db.Date
updatedAt DateTime @updatedAt @db.Date
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
milageEnd Int
milageStart Int
status BillStatus @default(UNINVOICED)
@@ -42,8 +42,8 @@ enum BookingStatus {
model Booking {
id String @id @default(uuid())
uuid String @unique @default(uuid())
createdAt DateTime @default(now()) @db.Date
updatedAt DateTime @updatedAt @db.Date
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
bill Bill? @relation(fields: [billId], references: [id], onDelete: Cascade)
billId Int? @unique
calendarEventId String?