-- Orders tablosuna eksik sütunları ekle
ALTER TABLE orders 
ADD COLUMN tracking_number VARCHAR(100) AFTER payment_method,
ADD COLUMN admin_notes TEXT AFTER notes,
ADD COLUMN address_id INT AFTER user_id;

-- Foreign key constraint ekle
ALTER TABLE orders 
ADD CONSTRAINT fk_orders_address_id 
FOREIGN KEY (address_id) REFERENCES addresses(id) ON DELETE SET NULL;

-- Index ekle
ALTER TABLE orders 
ADD INDEX idx_tracking_number (tracking_number);