<?php
/// file: database/migrations/010_create_careers.php

declare(strict_types=1);


return static function (PDO $pdo): void {
    $pdo->exec('CREATE TABLE IF NOT EXISTS careers (
      id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
      title VARCHAR(255) NOT NULL,
      slug VARCHAR(255) NOT NULL UNIQUE,
      location VARCHAR(120) NOT NULL DEFAULT "",
      type VARCHAR(64) NOT NULL DEFAULT "Full-time",
      description TEXT NOT NULL,
      sort_order INT NOT NULL DEFAULT 0,
      status ENUM(\'open\',\'closed\') NOT NULL DEFAULT \'open\',
      created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
      updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci');
};
