Database is undefined when using the postgresql driver
See original GitHub issueWhen using a postgresql database like this
// config/database.js
development: {
driver: 'pg',
username: 'postgres',
host: '***',
port: 5432,
database: 'lux_database',
password: '****'
},
But the database field is undefined here (src/packages/database/utils/connect.js#L22):
// node_modules/lux-framework/src/packages/database/utils/connect.js
const {
host,
socket,
driver,
database, // <--- undefined
username,
password
} = config;
Knex does then fallback to the current user of the OS which will likely be an incorrect database name.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (12 by maintainers)
Top Results From Across the Web
Access postgres in matlab without database toolbox
driver = org.postgresql.Driver;. I'm getting the following error. Undefined variable "org" or function "org.postgresql.
Read more >Installation error when choose pgsql database driver
When execute the script admin/cli/install.php, and the installation ask: == Choose database driver == type value : I type pgsql and I get...
Read more >"undefined function pg_pconnect()" when connecting to ...
I just installed Postgresql and pgadmin in my Ubuntu system. I can create a database from the pgadmin interface and everything seems ok, ......
Read more >Database Connection Error Messages - MATLAB & Simulink
Vendor Error Message Probable Causes
Microsoft SQL Server Invalid string or buffer length. 64‑bit ODBC driver error.
MySQL Unknown database 'databasename'. Provided database name is...
Read more >Drupal 8 BC for database driver namespace fails for replicas
... 9.4 to deal with old style database settings fails on database replicas. It triggers a warning: Warning: Undefined array key "driver" in ......
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 Free
Top 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
Just a heads up @harianus. Since @adampash I were unable to reproduce this, I’m going to close this issue for now. We can help debug and work through this in the Gitter room to find out the
database
isundefined
for you. After debugging we can reopen this issue, or create a new one if necessary.Thank you! 😃
Verified that it is fixed in the
perf
branch