diff --git a/.gitignore b/.gitignore index 06c3c6e..e171e98 100644 --- a/.gitignore +++ b/.gitignore @@ -65,4 +65,4 @@ typings/ # Databases # data/sleep-tracker.db3 -# data/test.db3 \ No newline at end of file +data/test.db3 diff --git a/data/dbConfig.js b/data/dbConfig.js index 93af946..9281381 100644 --- a/data/dbConfig.js +++ b/data/dbConfig.js @@ -3,6 +3,6 @@ require("dotenv").config(); const knex = require('knex'); const config = require('../knexfile'); -const environment = process.env.DB_ENV || 'test'; +const environment = process.env.DB_ENV; module.exports = knex(config[environment]); diff --git a/data/sleep-tracker.db3 b/data/sleep-tracker.db3 index 0047901..52578b6 100644 Binary files a/data/sleep-tracker.db3 and b/data/sleep-tracker.db3 differ diff --git a/data/test.db3 b/data/test.db3 index 8485c0d..0b6e902 100644 Binary files a/data/test.db3 and b/data/test.db3 differ diff --git a/knexfile.js b/knexfile.js index 363af91..e1c743d 100644 --- a/knexfile.js +++ b/knexfile.js @@ -21,7 +21,7 @@ module.exports = { } }, - test: { + testing: { client: "sqlite3", useNullAsDefault: true, connection: {