USE fortunes_quotation;

ALTER TABLE products ADD COLUMN IF NOT EXISTS product_category VARCHAR(100) NOT NULL AFTER id;
ALTER TABLE products ADD COLUMN IF NOT EXISTS product_name VARCHAR(180) NOT NULL AFTER product_category;
ALTER TABLE products ADD COLUMN IF NOT EXISTS description TEXT NULL AFTER product_name;
ALTER TABLE products ADD COLUMN IF NOT EXISTS brand VARCHAR(120) NULL AFTER description;
ALTER TABLE products ADD COLUMN IF NOT EXISTS model VARCHAR(120) NULL AFTER brand;
ALTER TABLE products ADD COLUMN IF NOT EXISTS unit VARCHAR(40) NOT NULL DEFAULT 'pcs' AFTER model;
ALTER TABLE products ADD COLUMN IF NOT EXISTS unit_price DECIMAL(12,2) NOT NULL DEFAULT 0 AFTER unit;
ALTER TABLE products ADD COLUMN IF NOT EXISTS status ENUM('active','inactive') NOT NULL DEFAULT 'active' AFTER unit_price;
ALTER TABLE products ADD COLUMN IF NOT EXISTS created_at DATETIME NOT NULL AFTER status;
ALTER TABLE products ADD COLUMN IF NOT EXISTS updated_at DATETIME NULL AFTER created_at;
