Add/update inital try of order components and add csv update script + update import script
This commit is contained in:
@@ -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)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user