mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
add a script to migrate from dirtyDB to MYSQL thanks to http://blog.codeborne.com
This commit is contained in:
parent
344ba31c92
commit
ff2e7ead09
1 changed files with 11 additions and 0 deletions
11
bin/migrateDirtyDBtoMySQL.js
Normal file
11
bin/migrateDirtyDBtoMySQL.js
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
var dirty = require("../src/node_modules/ueberDB/node_modules/dirty")('var/dirty.db');
|
||||||
|
var db = require("../src/node/db/DB");
|
||||||
|
|
||||||
|
db.init(function() {
|
||||||
|
db = db.db;
|
||||||
|
dirty.on("load", function() {
|
||||||
|
dirty.forEach(function(key, value) {
|
||||||
|
db.set(key, value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
Loading…
Add table
Add a link
Reference in a new issue