From 75751285febc7fa99b54ee27afbbf0603970b478 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Thu, 25 Jan 2018 16:18:05 -0700 Subject: [PATCH] fixed default setup --- bin/cli-setup | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/cli-setup b/bin/cli-setup index b0f5e2efa..282a8a2d7 100755 --- a/bin/cli-setup +++ b/bin/cli-setup @@ -13,6 +13,7 @@ const MODERATION_OPTIONS = require('../models/enum/moderation_options'); const SettingsService = require('../services/settings'); const SetupService = require('../services/setup'); const UsersService = require('../services/users'); +const MigrationService = require('../services/migration'); const errors = require('../errors'); // Register the shutdown criteria. @@ -51,6 +52,12 @@ const performSetup = async () => { if (program.defaults) { await SettingsService.init(); + // Get the migrations to run. + let migrations = await MigrationService.listPending(); + + // Perform all migrations. + await MigrationService.run(migrations); + console.log('Settings created.'); console.log('\nTalk is now installed!'); @@ -194,7 +201,7 @@ const performSetup = async () => { ); }; -// Start tthe setup process. +// Start the setup process. performSetup() .then(() => { util.shutdown();