summaryrefslogtreecommitdiff
path: root/bin/migrateDirtyDBtoMySQL.js
blob: d0273de0d5e6e4fc417d5c1f0a65c1dbb05ba9e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) {

  process.chdir(npm.root+'/..')

  var dirty = require("ep_etherpad-lite/node_modules/ueberDB/node_modules/dirty")('var/dirty.db');
  var db = require("ep_etherpad-lite/node/db/DB");

  db.init(function() {
    db = db.db;
    dirty.on("load", function() {
      dirty.forEach(function(key, value) {
        db.set(key, value);
      });
    });
  });

});