You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Users\Jan\Documents\throwaway\envRepro ([email protected])
λ npx prisma db push
Prisma schema loaded from schema.prisma
Error: Get config thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', query-engine\query-engine\src\opt.rs:148:21
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
C:\Users\Jan\Documents\throwaway\envRepro ([email protected])
λ npx prisma migrate dev
Prisma schema loaded from schema.prisma
Error: Get config thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', query-engine\query-engine\src\opt.rs:148:21
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
vs. handled error in Introspection:
C:\Users\Jan\Documents\throwaway\envRepro ([email protected])
λ npx prisma introspect
Prisma schema loaded from schema.prisma
Introspecting based on datasource defined in schema.prisma …
Error: There is no datasource in the schema.
After adding snapshots for commands referencing empty schemas in this PR, no other actionable task seems available for this issue.
Future steps might be:
Agree on a single, shared error message to display in case of "missing required blocks from the schema" (which is a generalization of having an empty schema)
This "missing required blocks" validation will most likely require access to the AST of the schema, so it should probably be performed by the Rust Prisma Engines and forwarded to the TS side
Note: We should consider that this issue doesn't seem to fall in the "broken promises" bucket, so we could postpone additional work on this until after our joint effort with the client team is completed.
Get DMMF: Error while trying to read datamodel path
Details: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
Prisma CLI Version : 0.0.0
db push
migrate reset
Couldn't find a datasource in the schema.prisma file
db pull
db execute
There is no datasource in the schema.
format
Formatted (.*) in \d+ms 🚀
For PRISMA_CLI_QUERY_ENGINE_TYPE === 'binary' there are some differences to note:
Different error:
migrate dev
Couldn't find a datasource in the schema.prisma file
The following are valid for the binary but not for the library
Note: this task requires the Wasm-ification of getConfig to be handled first (as getConfig can heavily influence the incomplete-schema tests linked to this issue).
Activity
tomhoule commentedon Aug 25, 2021
44 remaining items
cli: added snapshots for commands referencing empty schemas for issue #…
chore: add snapshots for commands referencing empty schemas (#14852)
jkomyno commentedon Aug 23, 2022
After adding snapshots for commands referencing empty schemas in this PR, no other actionable task seems available for this issue.
Future steps might be:
Note: We should consider that this issue doesn't seem to fall in the "broken promises" bucket, so we could postpone additional work on this until after our joint effort with the client team is completed.
Jolg42 commentedon Aug 23, 2022
jkomyno commentedon Aug 23, 2022
The current situation (as per main) is:
PRISMA_CLI_QUERY_ENGINE_TYPE === 'library'
For PRISMA_CLI_QUERY_ENGINE_TYPE === 'binary' there are some differences to note:
Different error:
The following are valid for the binary but not for the library
jkomyno commentedon Aug 26, 2022
Next steps:
validateandmigrate devfail with such an error when using the library. Can we change figure out thatundefinedparameter?getDmmfin the binary and libraryempty-schematests toincomplete-schematests (test(cli): empty-schema -> incomplete-schemas #15059):jkomyno commentedon Oct 4, 2022
Note: this task requires the Wasm-ification of
getConfigto be handled first (asgetConfigcan heavily influence theincomplete-schematests linked to this issue).fix(cli): handle empty schema.prisma without engine panic (prisma#29657)
fix(cli): handle empty schema.prisma without engine panic (prisma#29657)