diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-12-24 16:59:17 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-12-24 16:59:17 +0100 |
commit | 7920c273a204e2469416a30b752b12ccd3160102 (patch) | |
tree | 5b3d9ab9596dd5eb079a281f82b836e03eff1617 /server/initializers | |
parent | 3897209f46f4c4581be2b8963bf9acc28ca5032b (diff) | |
download | PeerTube-7920c273a204e2469416a30b752b12ccd3160102.tar.gz PeerTube-7920c273a204e2469416a30b752b12ccd3160102.tar.zst PeerTube-7920c273a204e2469416a30b752b12ccd3160102.zip |
Move tags in another table
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/database.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/server/initializers/database.js b/server/initializers/database.js index cc6f59b63..9642231b9 100644 --- a/server/initializers/database.js +++ b/server/initializers/database.js | |||
@@ -6,13 +6,24 @@ const Sequelize = require('sequelize') | |||
6 | 6 | ||
7 | const constants = require('../initializers/constants') | 7 | const constants = require('../initializers/constants') |
8 | const logger = require('../helpers/logger') | 8 | const logger = require('../helpers/logger') |
9 | const utils = require('../helpers/utils') | ||
9 | 10 | ||
10 | const database = {} | 11 | const database = {} |
11 | 12 | ||
12 | const sequelize = new Sequelize(constants.CONFIG.DATABASE.DBNAME, 'peertube', 'peertube', { | 13 | const sequelize = new Sequelize(constants.CONFIG.DATABASE.DBNAME, 'peertube', 'peertube', { |
13 | dialect: 'postgres', | 14 | dialect: 'postgres', |
14 | host: constants.CONFIG.DATABASE.HOSTNAME, | 15 | host: constants.CONFIG.DATABASE.HOSTNAME, |
15 | port: constants.CONFIG.DATABASE.PORT | 16 | port: constants.CONFIG.DATABASE.PORT, |
17 | benchmark: utils.isTestInstance(), | ||
18 | |||
19 | logging: function (message, benchmark) { | ||
20 | let newMessage = message | ||
21 | if (benchmark !== undefined) { | ||
22 | newMessage += ' | ' + benchmark + 'ms' | ||
23 | } | ||
24 | |||
25 | logger.debug(newMessage) | ||
26 | } | ||
16 | }) | 27 | }) |
17 | 28 | ||
18 | const modelDirectory = path.join(__dirname, '..', 'models') | 29 | const modelDirectory = path.join(__dirname, '..', 'models') |