<?php
/// file: database/migrations/006_create_contact_submissions.php

declare(strict_types=1);


return static function (PDO $pdo): void {
    $pdo->exec('CREATE TABLE IF NOT EXISTS contact_submissions (
      id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
      full_name VARCHAR(255) NOT NULL,
      email VARCHAR(255) NOT NULL,
      company VARCHAR(255) NOT NULL DEFAULT "",
      project_type VARCHAR(120) NOT NULL DEFAULT "",
      budget_range VARCHAR(120) NOT NULL DEFAULT "",
      timeline VARCHAR(120) NOT NULL DEFAULT "",
      message TEXT NOT NULL,
      status ENUM(\'new\',\'read\',\'archived\') NOT NULL DEFAULT \'new\',
      created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
      INDEX idx_status (status)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci');
};
