-- 001_create_projects.sql
CREATE TABLE IF NOT EXISTS projects (
  id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  idea_raw TEXT NOT NULL,
  is_generative TINYINT(1) NOT NULL DEFAULT 0,
  is_dry_run TINYINT(1) NOT NULL DEFAULT 0,
  status ENUM('pending','processing','done','failed') NOT NULL DEFAULT 'pending',
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  INDEX idx_status (status)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
