Skip to content

[Re-Introspection] Keep @map and @@map  #2545

@janpio

Description

@janpio

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() and cuid(). 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions