mirror of
https://github.com/wassname/talk.git
synced 2026-07-04 04:45:36 +08:00
removed explicit migration step
This commit is contained in:
@@ -12,7 +12,6 @@ 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 util = require('./util');
|
||||
const errors = require('../errors');
|
||||
|
||||
@@ -64,37 +63,6 @@ const performSetup = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// Get the migrations to run.
|
||||
let migrations = await MigrationService.listPending();
|
||||
if (migrations.length > 0) {
|
||||
|
||||
console.log('Now going to run the following migrations:\n');
|
||||
|
||||
for (let {filename} of migrations) {
|
||||
console.log(`\tmigrations/${filename}`);
|
||||
}
|
||||
|
||||
console.log('');
|
||||
|
||||
let {confirm} = await inquirer.prompt([
|
||||
{
|
||||
type: 'confirm',
|
||||
name: 'confirm',
|
||||
message: 'Proceed with migrations',
|
||||
default: false
|
||||
}
|
||||
]);
|
||||
|
||||
if (!confirm) {
|
||||
throw new Error('migrations are needed to complete setup');
|
||||
}
|
||||
|
||||
// Perform all migrations.
|
||||
await MigrationService.run(migrations);
|
||||
} else {
|
||||
console.log('No migrations have to be run.');
|
||||
}
|
||||
|
||||
// Create the base settings model.
|
||||
let settings = new SettingModel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user