diff options
author | John McLear <john@mclear.co.uk> | 2012-10-25 09:40:33 -0700 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2012-10-25 09:40:33 -0700 |
commit | ff2e7ead0982b4db01680536ff3392b1abe2a02a (patch) | |
tree | b51ca5841bef49e79df75c31868e6c5411eb35e1 | |
parent | 344ba31c921d77f7ef17ce4ff02a930c7133db76 (diff) | |
download | etherpad-lite-ff2e7ead0982b4db01680536ff3392b1abe2a02a.zip |
add a script to migrate from dirtyDB to MYSQL thanks to http://blog.codeborne.com
-rw-r--r-- | bin/migrateDirtyDBtoMySQL.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/migrateDirtyDBtoMySQL.js b/bin/migrateDirtyDBtoMySQL.js new file mode 100644 index 00000000..f2bc8efe --- /dev/null +++ b/bin/migrateDirtyDBtoMySQL.js @@ -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); + }); + }); +}); |