Skip to content

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

Closed

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.

Activity

  1. changed the title [-]Schema notation to have not surface specific models present in the schema in the Prisma Client API[/-] [+]Schema notation to not surface specific models in the Prisma Client API[/+] on Jan 21, 2021
  2. added this to the 2.16.0 milestone on Jan 21, 2021
  3. modified the milestones: 2.16.0, 2.17.0 on Feb 3, 2021
  4. do4gr commented on Feb 12, 2021

    @do4gr
    Member

    This is implemented in 2.17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions