site) ? $m->site : [SITE_ID => SITE_ID]; foreach ($sites as $siteid) { $table = $m->dbprefix($siteid.'_block'); if ($m->is_table_exists($table)) { continue; } $t->create_table($table, [ 'id' => 'smallint(5) unsigned NOT NULL AUTO_INCREMENT', 'name' => 'varchar(100) NOT NULL COMMENT \'名称\'', 'code' => 'varchar(100) NOT NULL COMMENT \'别名\'', 'hide' => 'tinyint(1) unsigned NOT NULL COMMENT \'隐藏\'', 'content' => 'text NOT NULL COMMENT \'内容\'', ], [ 'PRIMARY KEY (`id`)', 'KEY `code` (`code`)', ], '资料块表'); }