This commit is contained in:
walkor 2022-12-26 09:52:06 +08:00
parent cfa1d1296b
commit c9df58cacf

View File

@ -70,6 +70,7 @@ class InstallController extends Base
$tables_to_install = [
'wa_admins',
'wa_admin_roles',
'wa_roles',
'wa_rules',
'wa_options',
@ -86,6 +87,10 @@ class InstallController extends Base
if ($tables_conflict) {
return $this->json(1, '以下表' . implode(',', $tables_conflict) . '已经存在,如需覆盖请选择强制覆盖');
}
} else {
foreach ($tables_to_install as $table) {
$db->exec("DROP TABLE `$table`");
}
}
$sql_file = base_path() . '/plugin/admin/install.sql';