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:
2025-01-12 13:09:40 -05:00
parent 6e1a8cf17d
commit 6c524aa3a9
5 changed files with 211 additions and 341 deletions

View File

@@ -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