Programmable API createDatabase arguments are overridden
See original GitHub issueI’m submitting a…
- Bug report
- Feature request
- Question
Current behavior
Command line parameters override createDatabase
parameters in Programable API.
$ DATABASE_URL=postgres://localhost/postgres node index.js
[INFO] Created database "expected"
$ DATABASE_URL=postgres://localhost/postgres node index.js unexpected
[INFO] Created database "unexpected"
Expected behavior
I would expect parameters provided to createDatabase
always override possible command line arguments.
$ DATABASE_URL=postgres://localhost/postgres node index.js
[INFO] Created database "expected"
$ DATABASE_URL=postgres://localhost/postgres node index.js unexpected
[INFO] Created database "expected"
Minimal reproduction of the problem with instructions
$ cat index.js
var dbmigrate = require('db-migrate');
var dbm = dbmigrate.getInstance(true);
dbm.createDatabase('expected')
.then(function() {
process.exit(0);
});
What is the motivation / use case for changing the behavior?
Using createDatabase
through Programable API in an program that has command line args is not possible at the moment.
Environment
db-migrate version: 0.11.1
db-migrate-pg version: 0.4.0
Additional information:
- Node version: v10.6.0
- Platform: Mac
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
sqlite3 — DB-API 2.0 interface for SQLite databases — Python ...
The sqlite3 module supports qmark , numeric , and named DB-API parameter styles, because that is what the underlying SQLite library supports.
Read more >Database Engine events and errors - SQL Server
4165, 16, No, The score override argument, if present in one of the subqueries, must be present in all subqueries and must be...
Read more >SQLiteOpenHelper | Android Developers
Sets configuration parameters that are used for opening SQLiteDatabase . ... If not overridden, default implementation will reject downgrade and throws ...
Read more >Glue — Boto3 Docs 1.26.38 documentation - Amazon AWS
Although this parameter is not required by the SDK, you must specify this parameter for a valid ... This overrides the timeout value...
Read more >4. HiveQL: Data Definition - Programming Hive [Book] - O'Reilly
You can override this default location for the new directory as shown in this example: hive > CREATE DATABASE financials > LOCATION ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Faced this bug right now. Found the exact line where it happening https://github.com/db-migrate/node-db-migrate/blob/3c4bd779dead6075509fbc155566b36dc08e94a5/lib/commands/db.js#L10
I will check this, probably conflicting with the general config hirarchy.