alsmanager_lib 1.0.70 → 1.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/modules.js +12 -11
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -7893,19 +7893,20 @@ function getPackageJsVersion() {
|
|
|
7893
7893
|
|
|
7894
7894
|
// Export DB
|
|
7895
7895
|
|
|
7896
|
-
function exportDBSQLSQLite(db_path, dump_path,
|
|
7897
|
-
var
|
|
7898
|
-
|
|
7896
|
+
function exportDBSQLSQLite(db_path, dump_path, dump_filename) {
|
|
7897
|
+
var fileName = "";
|
|
7898
|
+
var path = require('path');
|
|
7899
|
+
if (!dump_filename) {
|
|
7899
7900
|
var d = new Date();
|
|
7900
|
-
datestring = d.getFullYear() + ("0"
|
|
7901
|
+
datestring = d.getFullYear() + ("0"+(d.getMonth()+1)).slice(-2) + ("0" + d.getDate()).slice(-2) +
|
|
7901
7902
|
"_" + ("0" + d.getHours()).slice(-2) + ("0" + d.getMinutes()).slice(-2) + ("0" + d.getSeconds()).slice(-2);
|
|
7903
|
+
fileName = "ALSnr_" + datestring + ".sql";
|
|
7902
7904
|
}
|
|
7903
7905
|
else {
|
|
7904
|
-
|
|
7906
|
+
fileName = dump_filename;
|
|
7905
7907
|
}
|
|
7906
7908
|
|
|
7907
|
-
var
|
|
7908
|
-
var fileOut = path.join(dump_path, "ALSnr_" + dump_source + datestring + ".sql");
|
|
7909
|
+
var fileOut = path.join(dump_path, fileName);
|
|
7909
7910
|
|
|
7910
7911
|
let cmd = "sqlite3 " + db_path + " ";
|
|
7911
7912
|
cmd += "\"" + ".output " + fileOut + "\"";
|
|
@@ -7924,18 +7925,18 @@ function exportDBSQLSQLite(db_path, dump_path, dump_source, dump_date) {
|
|
|
7924
7925
|
|
|
7925
7926
|
return cmd;
|
|
7926
7927
|
}
|
|
7927
|
-
function exportDBSQLMySQL(db_path, dump_path,
|
|
7928
|
+
function exportDBSQLMySQL(db_path, dump_path, dump_filename) {
|
|
7928
7929
|
|
|
7929
7930
|
}
|
|
7930
|
-
function exportDBSQL(db_used, db_path, dump_path,
|
|
7931
|
+
function exportDBSQL(db_used, db_path, dump_path, dump_filename) {
|
|
7931
7932
|
var query = "";
|
|
7932
7933
|
if (db_used) {
|
|
7933
7934
|
switch (db_used) {
|
|
7934
7935
|
case 'SQLITE':
|
|
7935
|
-
query = exportDBSQLSQLite(db_path,
|
|
7936
|
+
query = exportDBSQLSQLite(db_path, db_path, dump_path, dump_filename);
|
|
7936
7937
|
break;
|
|
7937
7938
|
case 'MYSQL':
|
|
7938
|
-
query = exportDBSQLMySQL(db_path,
|
|
7939
|
+
query = exportDBSQLMySQL(db_path, db_path, dump_path, dump_filename);
|
|
7939
7940
|
break;
|
|
7940
7941
|
}
|
|
7941
7942
|
}
|