mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
Backup database before deletion
No issue - a json object is now created when a user deletes content in labs
This commit is contained in:
parent
d593425147
commit
8025325b15
@ -4,6 +4,7 @@ var _ = require('lodash'),
|
||||
Promise = require('bluebird'),
|
||||
dataExport = require('../data/export'),
|
||||
importer = require('../data/importer'),
|
||||
backupDatabase = require('../data/migration').backupDatabase,
|
||||
models = require('../models'),
|
||||
errors = require('../errors'),
|
||||
utils = require('./utils'),
|
||||
@ -122,6 +123,7 @@ db = {
|
||||
|
||||
tasks = [
|
||||
utils.handlePermissions(docName, 'deleteAllContent'),
|
||||
backupDatabase,
|
||||
deleteContent
|
||||
];
|
||||
|
||||
|
@ -20,14 +20,14 @@ var _ = require('lodash'),
|
||||
// private
|
||||
logInfo,
|
||||
populateDefaultSettings,
|
||||
backupDatabase,
|
||||
fixClientSecret,
|
||||
|
||||
// public
|
||||
init,
|
||||
reset,
|
||||
migrateUp,
|
||||
migrateUpFreshDb;
|
||||
migrateUpFreshDb,
|
||||
backupDatabase;
|
||||
|
||||
logInfo = function logInfo(message) {
|
||||
errors.logInfo(i18n.t('notices.data.migration.index.migrations'), message);
|
||||
@ -208,6 +208,7 @@ migrateUp = function (fromVersion, toVersion) {
|
||||
module.exports = {
|
||||
init: init,
|
||||
reset: reset,
|
||||
backupDatabase: backupDatabase,
|
||||
migrateUp: migrateUp,
|
||||
migrateUpFreshDb: migrateUpFreshDb
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user