Add/update inital try of order components and add csv update script + update import script

This commit is contained in:
2025-01-10 00:01:43 -05:00
parent afe8510751
commit 8bdd188dfe
17 changed files with 38513 additions and 37881 deletions

View File

@@ -43,12 +43,18 @@ CREATE TABLE IF NOT EXISTS orders (
tax_included BOOLEAN DEFAULT false,
shipping DECIMAL(10, 3) DEFAULT 0,
customer VARCHAR(50) NOT NULL,
status VARCHAR(20) DEFAULT 'pending',
payment_method VARCHAR(50),
shipping_method VARCHAR(50),
shipping_address TEXT,
billing_address TEXT,
canceled BOOLEAN DEFAULT false,
FOREIGN KEY (product_id) REFERENCES products(product_id),
FOREIGN KEY (SKU) REFERENCES products(SKU),
INDEX idx_order_number (order_number),
INDEX idx_customer (customer),
INDEX idx_date (date),
INDEX idx_status (status),
UNIQUE KEY unique_order_product (order_number, product_id)
);