Protect users table on reset, fix a few data management bugs, improve state and progress display

This commit is contained in:
2025-01-15 10:08:18 -05:00
parent e47d30080d
commit 0f5e5f75cd
4 changed files with 531 additions and 325 deletions

View File

@@ -155,6 +155,7 @@ async function resetDatabase() {
SELECT GROUP_CONCAT(table_name) as tables
FROM information_schema.tables
WHERE table_schema = DATABASE()
AND table_name != 'users'
`);
if (!tables[0].tables) {
@@ -173,6 +174,7 @@ async function resetDatabase() {
DROP TABLE IF EXISTS
${tables[0].tables
.split(',')
.filter(table => table !== 'users')
.map(table => '`' + table + '`')
.join(', ')}
`;