db-migrate / pg

A postgresql driver for db-migrate.
Other
67 stars 51 forks source link

Scope Configuration doesn't work with Postgres #45

Open Manny651 opened 5 years ago

Manny651 commented 5 years ago

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

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

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/74309620-scope-configuration-doesn-t-work-with-postgres?utm_campaign=plugin&utm_content=tracker%2F14258523&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F14258523&utm_medium=issues&utm_source=github).
jwdinker commented 5 years ago

is it hanging when it loads the migration subfolder?

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

wzrdtales commented 5 years ago

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 commented 5 years ago

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