Skip to content

Commit

Permalink
Rename the database from test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gino Bustelo committed Aug 28, 2016
1 parent 8b06eda commit 841e833
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
43 changes: 27 additions & 16 deletions config/config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
module.exports = {
"development": {
"username": "test",
"password": "test",
"database": "test",
"host": process.env.DB_HOST || "127.0.0.1",
"dialect": "postgres",
"migrationStorage": "none",
"logging": (process.env.DB_DEBUG==='true')
},
"production": {
"username": "root",
"password": null,
"database": "database_production",
"host": process.env.DB_HOST || "127.0.0.1",
"dialect": "postgres",
"logging": (process.env.DB_DEBUG==='true')
db: {
"test": {
"username": "test",
"password": "test",
"database": "giphy_bot_test",
"host": process.env.DB_HOST || "127.0.0.1",
"dialect": "postgres",
"migrationStorage": "none",
"logging": (process.env.DB_DEBUG==='true')
},
"development": {
"username": "test",
"password": "test",
"database": "giphy_bot_dev",
"host": process.env.DB_HOST || "127.0.0.1",
"dialect": "postgres",
"migrationStorage": "none",
"logging": (process.env.DB_DEBUG==='true')
},
"production": {
"username": "root",
"password": null,
"database": "giphy_bot_prod",
"host": process.env.DB_HOST || "127.0.0.1",
"dialect": "postgres",
"logging": (process.env.DB_DEBUG==='true')
}
}
}
2 changes: 1 addition & 1 deletion lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var path = require('path');
var Sequelize = require('sequelize');
var basename = path.basename(module.filename);
var env = process.env.NODE_ENV || 'development';
var config = require(__dirname + '/../../config/config')[env];
var config = require(__dirname + '/../../config/config').db[env];
var db = {};

if (config.use_env_variable) {
Expand Down

0 comments on commit 841e833

Please sign in to comment.