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: Error in migration engine. Reason: [libs\datamodel\core\src\transform\attributes\unique_and_index.rs:149:46] called Result::unwrap() on an Err value: TypeMismatchError { expected_type: "constant literal", received_type: "string", raw: "tenantId", span: Span { start: 6221, end: 6231 } } #5985

Closed
tomhoule opened this issue Mar 5, 2021 · 2 comments · Fixed by prisma/prisma-engines#1725
Assignees
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/schema Issue for team Schema. tech/engines/datamodel Issue about parsing/validation/rendering of the Prisma schema topic: error reporting Issues created via Prisma's CLI Crash Reporting
Milestone

Comments

@tomhoule
Copy link
Contributor

tomhoule commented Mar 5, 2021

Command: prisma db push --preview-feature --accept-data-loss
Version: 2.18.0
Binary Version: da6fafb57b24e0b61ca20960c64e2d41f9e8cff1
Report: https://prisma-errors.netlify.app/report/13069
OS: x64 win32 10.0.19042

JS Stacktrace:

Error: Error in migration engine.
Reason: [libs\datamodel\core\src\transform\attributes\unique_and_index.rs:149:46] called `Result::unwrap()` on an `Err` value: TypeMismatchError { expected_type: "constant literal", received_type: "string", raw: "tenantId", span: Span { start: 6221, end: 6231 } }

Please create an issue with your `schema.prisma` at 
https://github.com/prisma/prisma/issues/new

    at ChildProcess.<anonymous> (C:\Users\Ramin\Documents\GitHub\nest-multitenant\node_modules\prisma\build\index.js:54939:23)
    at ChildProcess.emit (events.js:315:20)
    at ChildProcess.EventEmitter.emit (domain.js:486:12)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)

Rust Stacktrace:

[libs\datamodel\core\src\transform\attributes\unique_and_index.rs:149:46] called `Result::unwrap()` on an `Err` value: TypeMismatchError { expected_type: "constant literal", received_type: "string", raw: "tenantId", span: Span { start: 6221, end: 6231 } }
@tomhoule tomhoule added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. tech/engines/datamodel Issue about parsing/validation/rendering of the Prisma schema labels Mar 5, 2021
@tomhoule tomhoule added this to the 2.19.0 milestone Mar 5, 2021
@janpio janpio added the topic: error reporting Issues created via Prisma's CLI Crash Reporting label Mar 5, 2021
@tomhoule tomhoule added the team/schema Issue for team Schema. label Mar 11, 2021
@tomhoule
Copy link
Contributor Author

@tomhoule
Copy link
Contributor Author

It's happening when putting string literals in @@unique. Actionable: better error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. team/schema Issue for team Schema. tech/engines/datamodel Issue about parsing/validation/rendering of the Prisma schema 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