-
Notifications
You must be signed in to change notification settings - Fork 281
feat(schema-engine-cli): add support for engine: 'classic'
in Prisma Config file
#5645
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
feat(schema-engine-cli): add support for engine: 'classic'
in Prisma Config file
#5645
Conversation
…amodel_to_connector" to bypass the fact that "psl::ValidatedSchema" isn't cloneable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the engine: 'classic'
configuration in Prisma Config files by introducing a --datasource
CLI flag to the schema-engine-cli that accepts a JSON-encoded object to override datasource URL-like attributes from the PSL datasource block.
Key changes:
- Add
--datasource
CLI parameter for JSON-encoded datasource URL overrides - Update engine state initialization to accept and apply datasource URL overrides
- Refactor datasource handling to support URL override functionality
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
schema-engine/cli/src/main.rs | Adds CLI parameter for datasource URL overrides and updates engine initialization |
schema-engine/core/src/state.rs | Updates EngineState to accept datasource URL overrides and apply them during initialization |
schema-engine/core/src/rpc.rs | Updates RpcApi constructor to pass through datasource URL overrides |
schema-engine/core/src/lib.rs | Adds debug logging and refactors configuration handling |
schema-engine/cli/Cargo.toml | Adds psl dependency for DatasourceUrls type |
psl/psl/src/lib.rs | Exports DatasourceUrls type |
psl/psl-core/src/lib.rs | Exports DatasourceUrls type |
psl/psl-core/src/configuration/env_vars.rs | Adds deprecation comment for StringFromEnvVar |
psl/psl-core/src/configuration/datasource.rs | Defines DatasourceUrls struct and adds override method to Datasource |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WASM Query Engine File Size
WASM Query Compiler File Size
|
CodSpeed Performance ReportMerging #5645 will not alter performanceComparing Summary
|
…L override in commands like "db pull", "migrate dev", etc
This PR: - closes [TML-1332](https://linear.app/prisma-company/issue/TML-1332/prisma-config-alternative-to-url-directurl-shadowdatabaseurl) - this PR depends on prisma/prisma-engines#5645. --------- Co-authored-by: jkomyno <[email protected]> Co-authored-by: Copilot <[email protected]>
This PR:
engine?: 'js' | 'classic'
prisma#28266--datasource
toschema-engine-cli
, which is a JSON-encoded object used to override PSL'sdatasource
URL-like attributes