<?php
declare(strict_types=1);

return [
    'up' => "
CREATE TABLE IF NOT EXISTS `permission_dependencies` (
    `id`             BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    `permission_key` VARCHAR(100) NOT NULL,
    `requires_key`   VARCHAR(100) NOT NULL,
    `is_auto_grant`  TINYINT(1) NOT NULL DEFAULT 1,
    UNIQUE KEY `uq_perm_dep` (`permission_key`, `requires_key`),
    INDEX `idx_perm_dep_requires` (`requires_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
",
    'down' => "DROP TABLE IF EXISTS `permission_dependencies`",
];
