Clean up from simplifying
This commit is contained in:
@@ -43,8 +43,7 @@ const CONFIG_TABLES = [
|
||||
'sales_seasonality',
|
||||
'turnover_config',
|
||||
'sync_status',
|
||||
'metric_calculation_config',
|
||||
'product_metric_status'
|
||||
'metric_calculation_config'
|
||||
];
|
||||
|
||||
// Split SQL into individual statements
|
||||
@@ -501,29 +500,6 @@ async function resetDatabase() {
|
||||
}
|
||||
}
|
||||
|
||||
// Verify triggers exist
|
||||
const [triggers] = await connection.query('SHOW TRIGGERS');
|
||||
const expectedTriggers = [
|
||||
'orders_after_insert_update',
|
||||
'purchase_orders_after_insert_update',
|
||||
'products_after_insert_update'
|
||||
];
|
||||
|
||||
const missingTriggers = expectedTriggers.filter(
|
||||
triggerName => !triggers.some(t => t.Trigger === triggerName)
|
||||
);
|
||||
|
||||
if (missingTriggers.length > 0) {
|
||||
throw new Error(
|
||||
`Missing required triggers: ${missingTriggers.join(', ')}`
|
||||
);
|
||||
}
|
||||
|
||||
outputProgress({
|
||||
operation: 'Triggers verified',
|
||||
message: `Successfully verified triggers: ${expectedTriggers.join(', ')}`
|
||||
});
|
||||
|
||||
outputProgress({
|
||||
status: 'complete',
|
||||
operation: 'Database reset complete',
|
||||
|
||||
Reference in New Issue
Block a user