Abluux
PPrisma
•Created by Abluux on 1/7/2025 in #help-and-questions
npx prisma migrate dev doesnt update @relation
model Todo {
id String @id @default(cuid())
customer String
title String
address String?
location Json?
description String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
camera String[]
nakkilista Boolean @default(false)
status Status @default(OPEN)
creatorId String
organizationId String
contactNumber String?
setDate DateTime?
creator User @relation("CreatedTodos", fields: [creatorId], references: [uid])
organization Organization @relation("OrganizationTodos", fields: [organizationId], references: [id]) // EDITED this
assignedUsers User[] @relation("TodoAssignments")
}
model Organization {
id String @id @default(cuid())
name String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
ownerId String
Invite Invite[]
owner User @relation("OwnerOrganizations", fields: [ownerId], references: [uid])
todos Todo[] @relation("OrganizationTodos") // EDITED this
users User[] @relation("UserMemberships")
}
Already in sync, no schema change or pending migration was found.
✔ Generated Prisma Client (v6.1.0) to .\node_modules@prisma\client in 90ms
database is postresql 16
i added relation to my schema and it just wont go to database and i dont know anymore what to do? i have reseted my database but that doesnt help either, i added some extra field to schema and that did go to database but didnt update relations. I dont know if this is a bug but i hope its going to get fixed. I will now delete the whole database and start from the beginning10 replies