Skip to content

Migrate helper to fix DB schemas that would not pass validation #6205

Open

Description

@do4gr

There are certain situations where the database schema has properties that if translated 1:1 to the Prisma datamodel would lead to an invalid datamodel.

Examples are:
1: non-matching datatypes on foreign key constraints
2: dangling Foreign Key definitions

In some of these cases introspect will ignore these (2) in others users would need to manually change them or comment out parts of their datamodel (1)

@carchrae had the great suggestion of providing a helper that suggests migrations that would fix these problems.

Activity

  1. added
    kind/feature
    on Mar 22, 2021
  2. Jolg42 commented on Apr 23, 2021

    @Jolg42
    Contributor

    Example #6700

  3. janpio commented on Dec 16, 2021

    @janpio
    Contributor

    Note: This might not be relevant any more, as both 1) and 2) could already be solved - to be confirmed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featuretopic: migrate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions