Protect users table on reset, fix a few data management bugs, improve state and progress display
This commit is contained in:
@@ -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(', ')}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user