diff options
Diffstat (limited to 'database/db.js')
-rw-r--r-- | database/db.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/database/db.js b/database/db.js index a360e9b..1e8b50d 100644 --- a/database/db.js +++ b/database/db.js @@ -6,7 +6,10 @@ const allMigrations = [ "database/001_games.sql", ]; -const db = new Database("jdm.db"); +const db = new Database( + process.env.NODE_ENV === "test" ? "testjdm.db" : "jdm.db", + process.env.NODE_ENV === "development" ? { verbose: console.log } : null +); db.pragma("foreign_keys = ON"); db.transaction(function migrate() { |