/* recreating and loading tables during development */

/* products delete and recreate */
CREATE TABLE my_products
(
  pdt_id INT PRIMARY KEY AUTO_INCREMENT,
  pdt_name VARCHAR(30) NOT NULL,
  cat CHAR(3) NOT NULL,
  amount INT DEFAULT NULL,
  price DECIMAL(10, 2) NOT NULL,
  img VARCHAR(30) NOT NULL
); 

LOAD DATA LOCAL INFILE 'public_html/sandbox/productsCSV.sql' 
INTO TABLE my_products FIELDS TERMINATED BY ', ';

/* order table delte and recreate */
CREATE TABLE my_order 
(
  order_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  cust_id INT NOT NULL,
  order_status VARCHAR(2) NOT NULL,
  date_time DATETIME NOT NULL
);

CREATE TABLE my_order_item
(
  order_item_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  order_item_name VARCHAR(30) NOT NULL,
  order_item_status VARCHAR(2) NOT NULL,
  order_id INT NOT NULL,
  pdt_id INT NOT NULL,
  quantity INT NOT NULL,
  price DECIMAL(6,2) NOT NULL
);