Comments (4)
Do I understand that you start a server running Prisma schema version 1, then migrate the database to Prisma schema version 2, change the data in the database to use an enum value of Prisma schema version 2, and then your already running server fails as it can not handle the new enum value that is being return for queries that concern the data that was changed?
from prisma.
Do I understand that you start a server running Prisma schema version 1, then migrate the database to Prisma schema version 2, change the data in the database to use an enum value of Prisma schema version 2, and then your already running server fails as it can not handle the new enum value that is being return for queries that concern the data that was changed?
Exactly!
If this is intended behavior feel free to change this issue to a feature request, i.e. to not throw error and instead ignore rows containing unknown enum values.
from prisma.
How would you expect Prisma to deal with the invalid data then?
How would your app deal with the data to be missing for this field?
from prisma.
I think this is currently expected.
Because the Prisma Client was generated with the given enum in the schema
enum MyEnum {
A
}
And does not know about the new enum value yet.
So after updating your Prisma schema and applying the migration you must also re-generate the Prisma Client with npx prisma generate
from prisma.
Related Issues (20)
- @prisma/client is not in the npm registry, or you have no permission to fetch it.
- ConnectorError: 42P05 occurs frequently HOT 12
- Prisma relation query and connect behave strangely with composite relations
- prisma difficulty with accelerate HOT 1
- findMany returns integer instead of floats HOT 4
- Multiple concurrent raw queries lead to timeouts HOT 2
- Raw Query with $executeRaw Fails When Using Variable in SQL CREATE SEQUENCE
- Better error serialization (stack traces)
- groupBy include/select by aggregate field
- Raw Query Throws an Error in Release 5.17.0 HOT 8
- Error thrown using PrismaClient in Cloudflare Pages project HOT 4
- Incorrect type inferred when using conditional include on 1:N relation field HOT 2
- Prisma client not working. HOT 1
- Heroku error: Error: Could not resolve @prisma/client despite the installation that we just tried. HOT 1
- Incorrect type inferred when using omit + include inside of an include. HOT 1
- Reusing Scalar Fields Types
- updateMany fails on implicit many-to-many self relation
- Client is still generated in the postinstall with PRISMA_SKIP_POSTINSTALL_GENERATE=true in .env
- Timed out fetching a new connection from the pool HOT 20
- All tables missing in build only HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisma.