mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
bin/rebuildPad.js: Don't overwrite DB settings
There's no need, and setting `json` to true breaks databases that do their own serialization of ECMAScript objects.
This commit is contained in:
parent
bf209ddad3
commit
846e3e9fbd
1 changed files with 0 additions and 5 deletions
|
@ -28,11 +28,6 @@ const newPadId = process.argv[4] || `${padId}-rebuilt`;
|
||||||
|
|
||||||
const PadManager = require('ep_etherpad-lite/node/db/PadManager');
|
const PadManager = require('ep_etherpad-lite/node/db/PadManager');
|
||||||
const Pad = require('ep_etherpad-lite/node/db/Pad').Pad;
|
const Pad = require('ep_etherpad-lite/node/db/Pad').Pad;
|
||||||
// Get references to the original pad and to a newly created pad
|
|
||||||
// HACK: This is a standalone script, so we want to write everything
|
|
||||||
// out to the database immediately. The only problem with this is
|
|
||||||
// that a driver (like the mysql driver) can hardcode these values.
|
|
||||||
db.db.db.settings = {cache: 0, writeInterval: 0, json: true};
|
|
||||||
// Validate the newPadId if specified and that a pad with that ID does
|
// Validate the newPadId if specified and that a pad with that ID does
|
||||||
// not already exist to avoid overwriting it.
|
// not already exist to avoid overwriting it.
|
||||||
if (!PadManager.isValidPadId(newPadId)) {
|
if (!PadManager.isValidPadId(newPadId)) {
|
||||||
|
|
Loading…
Reference in a new issue