Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in migration engine. Reason: entered unreachable code #16340

Closed
jkomyno opened this issue Nov 18, 2022 · 2 comments · Fixed by prisma/prisma-engines#3515
Closed

Error in migration engine. Reason: entered unreachable code #16340

jkomyno opened this issue Nov 18, 2022 · 2 comments · Fixed by prisma/prisma-engines#3515
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. topic: dbgenerated topic: error reporting Issues created via Prisma's CLI Crash Reporting
Milestone

Comments

@jkomyno
Copy link
Contributor

jkomyno commented Nov 18, 2022

Command: prisma db push
Version: 4.6.1
Binary Version: 694eea289a8462c80264df36757e4fdc129b1b32
Report: https://prisma-errors.netlify.app/report/14435
OS: x64 win32 10.0.22000

JS Stacktrace:

Error: Error in migration engine.
Reason: [migration-engine\connectors\sql-migration-connector\src\sql_renderer\mysql_renderer.rs:521:97] internal error: entered unreachable code

Rust Stacktrace:

Starting migration engine RPC server
The migration was not applied because it triggered warnings and the force flag was not passed.
[migration-engine\connectors\sql-migration-connector\src\sql_renderer\mysql_renderer.rs:521:97] internal error: entered unreachable code
@jkomyno jkomyno added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: error reporting Issues created via Prisma's CLI Crash Reporting team/schema Issue for team Schema. process/candidate labels Nov 18, 2022
@Jolg42 Jolg42 added this to the 4.8.0 milestone Nov 30, 2022
@pimeys
Copy link
Contributor

pimeys commented Dec 13, 2022

  • relationMode: "prisma"
  • Latest main
  • Push the data model in the error two times
  • unreachable code

@pimeys pimeys added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Dec 13, 2022
@pimeys pimeys self-assigned this Dec 15, 2022
@pimeys
Copy link
Contributor

pimeys commented Dec 15, 2022

Simplified data model that makes this bug to happen:

model Class {
  id    Int      @id
  when  DateTime @default(dbgenerated()) @db.Time
}

Push this two times, the second one panics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. topic: dbgenerated topic: error reporting Issues created via Prisma's CLI Crash Reporting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants