[Re-Introspection] Keep @map and @@map #2545
Labels
kind/feature
A request for a new feature.
tech/engines
Issue for tech Engines.
topic: previewFeatures
Issue touches on an preview feature flag
topic: re-introspection
Milestone
Problem
If a user decides that they prefer a different name for a model or field, they can use
@map
or@@map
to give the model or field a different name for Prisma Client, that will be used in the generated API.There are multiple default values that are not persisted in the database, most important
uuid()
andcuid()
. Re-Introspection thus looses them, making it necessary for users to be on the lookout for them and apply them manually again.Suggested solution
Use the old schema as input to figure out if a field or model was renamed before and use the same
@map
or@@map
again.The text was updated successfully, but these errors were encountered: