mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-18 02:41:28 +03:00
Fixed DB migration for tables with no docs
This commit is contained in:
@@ -873,6 +873,7 @@ exports.importJSONToDB = async (db_json, users_json) => {
|
|||||||
let success = true;
|
let success = true;
|
||||||
for (let i = 0; i < table_keys.length; i++) {
|
for (let i = 0; i < table_keys.length; i++) {
|
||||||
const table_key = table_keys[i];
|
const table_key = table_keys[i];
|
||||||
|
if (!tables_obj[table_key] || tables_obj[table_key].length === 0) continue;
|
||||||
success &= await exports.insertRecordsIntoTable(table_key, tables_obj[table_key]);
|
success &= await exports.insertRecordsIntoTable(table_key, tables_obj[table_key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user