<?php
declare(strict_types=1);

return [
    'up' => "
        CREATE TABLE IF NOT EXISTS `password_history` (
            `id`            BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
            `employee_id`   BIGINT UNSIGNED NOT NULL,
            `password_hash` VARCHAR(255) NOT NULL,
            `created_at`    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
            INDEX `idx_password_history_emp` (`employee_id`),
            CONSTRAINT `fk_password_history_emp` FOREIGN KEY (`employee_id`) REFERENCES `employees`(`id`) ON DELETE CASCADE
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    ",
    'down' => "DROP TABLE IF EXISTS `password_history`",
];