Integrate config tables into existing scripts, add new config tables and settings pages

This commit is contained in:
2025-01-12 15:40:27 -05:00
parent b815062525
commit 8172323954
13 changed files with 1671 additions and 126 deletions

View File

@@ -1,17 +0,0 @@
-- Indexes for orders table
CREATE INDEX IF NOT EXISTS idx_orders_product_date ON orders(product_id, date);
CREATE INDEX IF NOT EXISTS idx_orders_date ON orders(date);
-- Indexes for purchase_orders table
CREATE INDEX IF NOT EXISTS idx_po_product_date ON purchase_orders(product_id, date);
CREATE INDEX IF NOT EXISTS idx_po_product_status ON purchase_orders(product_id, status);
CREATE INDEX IF NOT EXISTS idx_po_vendor ON purchase_orders(vendor);
-- Indexes for product_metrics table
CREATE INDEX IF NOT EXISTS idx_metrics_revenue ON product_metrics(total_revenue);
-- Indexes for stock_thresholds table
CREATE INDEX IF NOT EXISTS idx_thresholds_category_vendor ON stock_thresholds(category_id, vendor);
-- Indexes for product_categories table
CREATE INDEX IF NOT EXISTS idx_product_categories_both ON product_categories(product_id, category_id);