<?php
$rt = \Phpcmf\Service::M('table')->install_schema([
    'tables' => [
        'module_form' => [
            'comment' => '模块表单表',
            'fields' => [
                'id' => 'smallint(5) unsigned NOT NULL AUTO_INCREMENT',
                'name' => 'varchar(50) NOT NULL COMMENT \'表单名称\'',
                'table' => 'varchar(50) NOT NULL COMMENT \'表单表名称\'',
                'module' => 'varchar(50) NOT NULL COMMENT \'模块目录\'',
                'disabled' => 'tinyint(1) unsigned NOT NULL COMMENT \'是否禁用\'',
                'setting' => 'text NOT NULL COMMENT \'表单配置\'',
            ],
            'indexes' => [
                'PRIMARY KEY (`id`)',
                'KEY `table` (`table`)',
                'KEY `disabled` (`disabled`)',
            ],
        ],
    ],
    'seeds' => [],
]);
if (empty($rt['code'])) {
    log_message('error', 'Mform install_schema: '.($rt['msg'] ?? ''));
}
