Merge pull request #1150 from marcelklehr/fix/script-migrate-dirty-mysql
Fix #1142 error in bin/migrateDirtyDBtoMySQL.jspull/1152/merge
commit
3821c1441c
|
@ -1,11 +1,17 @@
|
||||||
var dirty = require("../src/node_modules/ueberDB/node_modules/dirty")('var/dirty.db');
|
require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) {
|
||||||
var db = require("../src/node/db/DB");
|
|
||||||
|
|
||||||
db.init(function() {
|
process.chdir(npm.root+'/..')
|
||||||
db = db.db;
|
|
||||||
dirty.on("load", function() {
|
var dirty = require("ep_etherpad-lite/node_modules/ueberDB/node_modules/dirty")('var/dirty.db');
|
||||||
dirty.forEach(function(key, value) {
|
var db = require("ep_etherpad-lite/node/db/DB");
|
||||||
db.set(key, value);
|
|
||||||
|
db.init(function() {
|
||||||
|
db = db.db;
|
||||||
|
dirty.on("load", function() {
|
||||||
|
dirty.forEach(function(key, value) {
|
||||||
|
db.set(key, value);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue