diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-09-26 23:10:32 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-09-26 23:10:32 +0200 |
commit | f6a0754fdacf9b890292f1efc62a9035bceb454a (patch) | |
tree | 236e80a5026d78930978a211f5d6939529945805 /server/initializers/installer.js | |
parent | da4971c11f16b541804b5071d543166cd3954a98 (diff) | |
download | PeerTube-f6a0754fdacf9b890292f1efc62a9035bceb454a.tar.gz PeerTube-f6a0754fdacf9b890292f1efc62a9035bceb454a.tar.zst PeerTube-f6a0754fdacf9b890292f1efc62a9035bceb454a.zip |
Server: fix migration at installation
Diffstat (limited to 'server/initializers/installer.js')
-rw-r--r-- | server/initializers/installer.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/initializers/installer.js b/server/initializers/installer.js index 974402094..8c3148e79 100644 --- a/server/initializers/installer.js +++ b/server/initializers/installer.js | |||
@@ -13,6 +13,7 @@ const constants = require('./constants') | |||
13 | const logger = require('../helpers/logger') | 13 | const logger = require('../helpers/logger') |
14 | const peertubeCrypto = require('../helpers/peertube-crypto') | 14 | const peertubeCrypto = require('../helpers/peertube-crypto') |
15 | 15 | ||
16 | const Application = mongoose.model('Application') | ||
16 | const Client = mongoose.model('OAuthClient') | 17 | const Client = mongoose.model('OAuthClient') |
17 | const User = mongoose.model('User') | 18 | const User = mongoose.model('User') |
18 | 19 | ||
@@ -117,7 +118,9 @@ function createOAuthAdminIfNotExist (callback) { | |||
117 | logger.info('Username: ' + username) | 118 | logger.info('Username: ' + username) |
118 | logger.info('User password: ' + password) | 119 | logger.info('User password: ' + password) |
119 | 120 | ||
120 | return callback(null) | 121 | logger.info('Creating Application collection.') |
122 | const application = new Application({ mongoSchemaVersion: constants.LAST_MONGO_SCHEMA_VERSION }) | ||
123 | application.save(callback) | ||
121 | }) | 124 | }) |
122 | }) | 125 | }) |
123 | } | 126 | } |