-- Run this in cPanel phpMyAdmin or MySQL CLI against your app database.

CREATE TABLE IF NOT EXISTS orders (
  id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  name VARCHAR(255) NOT NULL,
  phone VARCHAR(32) NOT NULL,
  address TEXT NOT NULL,
  size VARCHAR(512) DEFAULT NULL,
  quantity VARCHAR(128) DEFAULT NULL,
  model TEXT,
  delivery_area VARCHAR(128) DEFAULT NULL,
  total_amount VARCHAR(64) DEFAULT NULL,
  PRIMARY KEY (id),
  KEY idx_orders_created_at (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
