P
Prisma4mo ago
Mr Tung

DB Push automatically creates the table _Table.

Hello, I don't understand; recently, when I run DB Push, it automatically generates tables with the prefix _TABLE. I searched the entire schema but couldn't find those tables. I'm using Planetscale, and this has never happened before. I hope for your assistance.
No description
4 Replies
Prisma AI Help
Prisma AI Help4mo ago
Ahoy, knowledge seeker! I'm the Prisma AI Help Bot. Do you want a dev's response that might take a hot second, or an AI answer that's ready before your next coffee sip? Either way, your question is important to us.
Nurul
Nurul4mo ago
Hey! Is this happening on latest prisma version 6.13.0? Could you share your schema file with me? Are you using implicit many-to-many relations in your schema, Prisma automatically generates join tables in your database. These tables are typically named with a leading underscore (e.g, _UserToRole) to indicate that they are used internally for many-to-many relationships.
Mr Tung
Mr TungOP2mo ago
model Address {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt
street String? @db.Text
city String?
state String?
country String?
lat Float?
lng Float?
zipCode String?
users User[]
usersDelivery User[] @relation("deliveryAddresses")
}

model User {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt
firstName String?
lastName String?
email String? @unique
address Address? @relation(fields: [addressId], references: [id])
addressId String?
deliveryAddresses Address[] @relation("deliveryAddresses")
}
model Address {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt
street String? @db.Text
city String?
state String?
country String?
lat Float?
lng Float?
zipCode String?
users User[]
usersDelivery User[] @relation("deliveryAddresses")
}

model User {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt
firstName String?
lastName String?
email String? @unique
address Address? @relation(fields: [addressId], references: [id])
addressId String?
deliveryAddresses Address[] @relation("deliveryAddresses")
}
This is a model on my end; it seems to be affected by a few model. Is there any solution for this?
Mr Tung
Mr TungOP2mo ago
I don't understand why there is a query error on that table in Planetscale.
No description

Did you find this page helpful?