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

Allowed to set default schema from knexfile file #3832

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paul4156
Copy link

No description provided.

@kibertoad
Copy link
Collaborator

@paul4156 Could you add test for this, and also documentation at https://github.com/knex/documentation ?

@kibertoad
Copy link
Collaborator

Also I assume TS types need to be updated in https://github.com/knex/knex/blob/master/types/index.d.ts

@paul4156
Copy link
Author

OK sure.

@kibertoad
Copy link
Collaborator

@paul4156 Any chance you could finish the PR?

@@ -54,6 +54,11 @@ function Knex(config) {
if (config.userParams) {
newKnex.userParams = config.userParams;
}

if (config.defaultSchema) {
newKnex.withSchema(config.defaultSchema);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell using withSchema on its own like this doesn't prepend the schema. At least not when printing out statements with debug on .

@OlivierCavadenti OlivierCavadenti self-assigned this Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants