-
-
Notifications
You must be signed in to change notification settings - Fork 253
Open
Labels
bugSomething isn't workingSomething isn't workings: triageSome tests need to be run to confirm the issueSome tests need to be run to confirm the issue
Milestone
Description
Description
The migration_table_name
option is added to Postgres connection strings, resulting in SQLSTATE 42704:
$ soda create --debug --env dml --path migrations-dml
v5.2.4
[POP] 2020/09/02 14:27:58 debug - Loading config file from /database.yml
[POP] 2020/09/02 14:27:58 info - create pricing (postgres://testing:testing@localhost:5432/primary?migration_table_name=dml_migration)
[POP] 2020/09/02 14:27:58 sql - CREATE DATABASE "pricing"
Error: couldn't create database pricing: error creating PostgreSQL database pricing: failed to connect to `host=localhost user=testing database=postgres`: server error (FATAL: unrecognized configuration parameter "migration_table_name" (SQLSTATE 42704))
Database, user, password, and etc. are masked/generic on purpose.
Steps to Reproduce the Problem
Given a database config file such as config/database.yml
:
database:
dialect: "postgres"
database: {{ envOr "DB_NAME" "primary" }}
host: {{ envOr "DB_HOST" "localhost" }}
port: {{ envOr "DB_PORT" "5432" }}
user: {{ envOr "DB_USER" "testing" }}
password: {{ envOr "DB_PASSWORD" "testing" }}
# default migration_table_name is "schema_migration"
dml:
dialect: "postgres"
database: {{ envOr "DB_NAME" "primary" }}
host: {{ envOr "DB_HOST" "localhost" }}
port: {{ envOr "DB_PORT" "5432" }}
user: {{ envOr "DB_USER" "testing" }}
password: {{ envOr "DB_PASSWORD" "testing" }}
options:
migration_table_name: dml_migration
With those two migration folders existing on disk, run the command:
soda create --debug --env dml --path migrations-dml
And get the output above.
Expected Behavior
The option to work as described in documentation.
Actual Behavior
It did not work as described in documentation.
Info
Alpine 3.12, Go 1.14.6, soda
built from source as v5.2.4.
kyrozetera
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workings: triageSome tests need to be run to confirm the issueSome tests need to be run to confirm the issue