Skip to content

Schema notation to not surface specific models in the Prisma Client API #5217

@albertoperdomo

Description

@albertoperdomo

Problem

Prisma Client does not support models without a primary key. When introspecting such tables, these are commented out in the Prisma schema, which triggers Migrate to attempt to drop these tables.

We should add a specific notation in the Prisma schema, which allows us to have these models in the Prisma schema and use Migrate to modify these tables, without interfering with the Prisma Client API. While Client would not generate any type, developers could still use our raw client API methods to use these models in their applications.

Suggested solution

Add an @@ignore directive for models.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions