0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/data/migration/fixtures/settings.js
Hannah Wolfe 2cfee3812f Split migrations/index.js & add tests
refs #6301

- changes createTable to use createTableIfNotExists, this is consistent with deletion
- splits out backup, reset, update and populate functions from migration/index into their own files
- moves the wrapped function for populatingDefaultSettings to fixtures.ensureDefaultSettings
- moves `modelOptions` down to the fixture files that actually use it
- adds test coverage for backup, reset and populate, but not for update as that needs refactoring
2016-03-15 10:11:33 +00:00

12 lines
364 B
JavaScript

var models = require('../../../models'),
ensureDefaultSettings;
ensureDefaultSettings = function ensureDefaultSettings(logInfo) {
// Initialise the default settings
logInfo('Populating default settings');
return models.Settings.populateDefaults().then(function () {
logInfo('Complete');
});
};
module.exports = ensureDefaultSettings;