prisma generate - The model name `Subscription` is invalid - Can you un-reserve the name `Subscription`?
See original GitHub issueSubscription
is an object we are using, Can you un-reserve the name Subscription
? Thanks
npx prisma generate
Environment variables loaded from prisma/.env
Error: Schema parsing
error: Error validating model "Subscription": The model name `Subscription` is invalid. It is a reserved name. Please change it.
--> schema.prisma:1158
|
1157 |
1158 | model Subscription {
1159 | averagePrice Float?
1160 | companieId String
1161 | countAveragePrice Float?
1162 | createdAt DateTime
1163 | dateCancellation DateTime?
1164 | id String @id
1165 | issuedCardId String
1166 | lastInvoiceDate DateTime?
1167 | maxDateAveragePrice DateTime?
1168 | minDateAveragePrice DateTime?
1169 | paymentFrequency Subscription_paymentFrequency?
1170 | productId String
1171 | status Subscription_status
1172 | testMode Boolean
1173 | trialPeriod Float?
1174 | updatedAt DateTime
1175 | userId String
1176 | Companie Companie @relation(fields: [companieId], references: [id])
1177 | IssuedCard IssuedCard @relation(fields: [issuedCardId], references: [id])
1178 | Product Product @relation(fields: [productId], references: [id])
1179 | User User @relation(fields: [userId], references: [id])
1180 | SubscriptionInvoice SubscriptionInvoice[] @relation("SubscriptionToSubscriptionInvoice_subscriptionId")
1181 | SubscriptionManagement SubscriptionManagement[]
1182 | DataProduct DataProduct[] @relation(references: [id])
1183 | File File[] @relation(references: [id])
1184 | Log Log[] @relation(references: [id])
1185 |
1186 | @@index([companieId], name: "companieId")
1187 | @@index([issuedCardId], name: "issuedCardId")
1188 | @@index([productId], name: "productId")
1189 | @@index([userId], name: "userId")
1190 | }
|
Validation Error Count: 1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Error message reference - Prisma
Prisma Client throws a PrismaClientInitializationError exception if something goes wrong when the query engine is started and the connection to the database is ......
Read more >Terms of Use - Prisma Labs
If made via a Google in-app subscription or purchase use the chat bot here to make that request or learn more about refunds...
Read more >Editorial and publishing policies | Scientific Reports - Nature
We reserve the right to reject a paper even after it has been accepted if it ... You may also name a limited...
Read more >Terms of Use - Lensa AI
There are additional paid features – for example, you would need to pay us to generate Avatars. To pay for subscription or any...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can change the name of the model to something else than
Subscription
and add@@map("Subscription")
inside the model, so Prisma knows what database table this refers to.@pantharshit00 https://github.com/prisma/prisma-engines/blob/b1c5396ac9832eb8481b3c7f36c393ab1747211d/libs/datamodel/core/src/transform/ast_to_dml/reserved_model_names.rs
The Subscription word reserved in
prisma engine
as a reserved GraphQL word.