mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed failure when upgrading to version 3.5.x
no issue
- Initialy reported here: https://forum.ghost.org/t/unable-to-upgrade-ghost-from-v3-0-2-to-v3-5-1/11925
- The issue was caused by the refactor in 52635f1aa8
where the backup module signature changed and it wasn't updated in migrations
This commit is contained in:
parent
4eeed0d32a
commit
25721828d9
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
var backup = require('../../../db/backup'),
|
var dbBackup = require('../../../db/backup'),
|
||||||
models = require('../../../../models');
|
models = require('../../../../models');
|
||||||
|
|
||||||
module.exports = function before() {
|
module.exports = function before() {
|
||||||
models.init();
|
models.init();
|
||||||
return backup();
|
return dbBackup.backup();
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@ var should = require('should'),
|
||||||
fs = require('fs-extra'),
|
fs = require('fs-extra'),
|
||||||
models = require('../../../../server/models'),
|
models = require('../../../../server/models'),
|
||||||
exporter = require('../../../../server/data/exporter'),
|
exporter = require('../../../../server/data/exporter'),
|
||||||
backupDatabase = require('../../../../server/data/db/backup');
|
dbBackup = require('../../../../server/data/db/backup');
|
||||||
|
|
||||||
describe('Backup', function () {
|
describe('Backup', function () {
|
||||||
var exportStub, filenameStub, fsStub;
|
var exportStub, filenameStub, fsStub;
|
||||||
|
@ -24,7 +24,7 @@ describe('Backup', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a backup JSON file', function (done) {
|
it('should create a backup JSON file', function (done) {
|
||||||
backupDatabase.backup().then(function () {
|
dbBackup.backup().then(function () {
|
||||||
exportStub.calledOnce.should.be.true();
|
exportStub.calledOnce.should.be.true();
|
||||||
filenameStub.calledOnce.should.be.true();
|
filenameStub.calledOnce.should.be.true();
|
||||||
fsStub.calledOnce.should.be.true();
|
fsStub.calledOnce.should.be.true();
|
||||||
|
|
Loading…
Add table
Reference in a new issue