<?php
declare(strict_types=1);

return [
    'up' => "
        CREATE TABLE IF NOT EXISTS `form_field_types` (
            `id`                   BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
            `type_code`            VARCHAR(50) NOT NULL,
            `name_ar`              VARCHAR(200) NOT NULL,
            `name_en`              VARCHAR(200) NULL,
            `renderer_config_json` JSON NULL,
            `validator_rules_json` JSON NULL,
            `is_system`            TINYINT(1) NOT NULL DEFAULT 0,
            `is_active`            TINYINT(1) NOT NULL DEFAULT 1,
            UNIQUE KEY `uq_form_field_types_code` (`type_code`)
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    ",
    'down' => "DROP TABLE IF EXISTS `form_field_types`",
];