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

Scope Configuration doesn't work with Postgres #45

Open
Manny651 opened this issue May 17, 2019 · 3 comments
Open

Scope Configuration doesn't work with Postgres #45

Manny651 opened this issue May 17, 2019 · 3 comments

Comments

@Manny651
Copy link

Manny651 commented May 17, 2019

Scope Configuration does not seem to work at all with PostgreSQL.

  • If "database" is specified in the sub configuration (config.json), it generates an invalid statement:

ERROR: syntax error at or near "`" at character 20. STATEMENT: SET search_path TO `databaseName`

  • If a "database" is not specified, the process freezes.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@jwdinker
Copy link

is it hanging when it loads the migration subfolder?

[INFO] loaded extra config for migration subfolder: "hm_private/config.json"

@wzrdtales
Copy link
Member

postgres is a lot different than other databases. can you post your config, then I can have a look and verify. What i think the issue is, that you specified database instead of schema in the config.

@Manny651
Copy link
Author

I just looked at the code, and I see several issues in the switchDatabase function:

  • Backticks are used as escape characters (instead of quotation marks)
  • If the options object does not have a database field, the callback is never called
  • It uses the database option to set the search path (instead of the schema).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants