+ Delete all relation when init privs.

This commit is contained in:
liumengyi
2023-03-13 05:34:02 +00:00
parent 9a0a3018e4
commit e7a33fa0c8
+1
View File
@@ -995,6 +995,7 @@ class groupModel extends model
$this->sortResource();
$resource = json_decode(json_encode($this->lang->resource), true);
$this->dao->delete()->from(TABLE_PRIVLANG)->exec();
$this->dao->delete()->from(TABLE_PRIVRELATION)->exec();
$this->dao->delete()->from(TABLE_PRIV)->exec();
$this->dao->delete()->from(TABLE_CONFIG)->where('module')->eq('priv')->exec();
$this->dbh->exec('ALTER TABLE ' . TABLE_PRIV . ' auto_increment = 1');