Fix time out error on data import and fix regression on progress display + sort out core and metrics schemas better
This commit is contained in:
@@ -84,6 +84,14 @@ async function resetMetrics() {
|
||||
// Disable foreign key checks first
|
||||
await connection.query('SET FOREIGN_KEY_CHECKS = 0');
|
||||
|
||||
// Drop the metrics views first
|
||||
outputProgress({
|
||||
status: 'running',
|
||||
operation: 'Dropping metrics views',
|
||||
percentage: '15'
|
||||
});
|
||||
await connection.query('DROP VIEW IF EXISTS inventory_health, product_sales_trends');
|
||||
|
||||
// Drop only the metrics tables if they exist
|
||||
const [existing] = await connection.query(`
|
||||
SELECT GROUP_CONCAT(table_name) as tables
|
||||
|
||||
Reference in New Issue
Block a user