Skip to content

Commit

Permalink
Add warning for undefined connection file (#5223)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramos-ph committed Jun 14, 2022
1 parent 49f90f4 commit 19c0079
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/dialects/sqlite3/index.js
Expand Up @@ -20,6 +20,15 @@ const QueryBuilder = require('./query/sqlite-querybuilder');
class Client_SQLite3 extends Client {
constructor(config) {
super(config);

if (config.connection && config.connection.filename === undefined) {
this.logger.warn(
'Could not find `connection.filename` in config. Please specify ' +
'the database path and name to avoid errors. ' +
'(see docs https://knexjs.org/guide/#configuration-options)'
);
}

if (config.useNullAsDefault === undefined) {
this.logger.warn(
'sqlite does not support inserting default values. Set the ' +
Expand Down

0 comments on commit 19c0079

Please sign in to comment.