Skip to content

orm init does not detect a Prisma 6 MongoDB schema #30473

Closed

Description

@wmadden-electric

orm init looks for a Prisma 7 schema and, when it finds one, tells the user to pass --from-prisma7-schema <path> (see packages/1-framework/3-tooling/cli/src/commands/init/errors.ts). A project whose schema.prisma is a Prisma 6 MongoDB schema (provider = "mongodb") gets no equivalent hint, even though the Mongo facade can read such a schema as its contract source through prisma6Schema (packages/3-extensions/mongo/src/config/prisma6-schema.ts, shipped in #30405).

What a user sees: running orm init in a Prisma 6 Mongo project produces the generic missing-flags error with no mention of the Prisma 6 path, so they have to find prisma6Schema in the docs themselves.

Likely fix: detect a mongodb datasource in a Prisma 6 schema the same way the Prisma 7 detection works and mention the prisma6Schema config in the error, or add a matching --from-prisma6-schema flag if init should write the config for them.

Recorded as an open item of the Mongo defaults, codecs and Prisma 6 source project (closed out with #30405 and its follow-ups).

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions