* TRUNCATE TABLE if driver is dm.

This commit is contained in:
songchenxuan
2023-06-13 14:16:46 +08:00
parent 2c0db453f0
commit 8c9d50f02f
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
TRUNCATE TABLE `zt_pivot`;
TRUNCATE TABLE `zt_chart`;
DELETE FROM `zt_screen` WHERE id IN (1,2,4,6,7,8);
+2
View File
@@ -393,6 +393,8 @@ class installModel extends model
$dbFile = $this->app->getAppRoot() . 'db' . DS . 'zentao.sql';
$tables = explode(';', file_get_contents($dbFile));
if($this->config->db->driver == 'dm') $tables = array_merge($tables, explode(';', file_get_contents($this->app->getAppRoot() . 'db' . DS . 'dm.sql'));
foreach($tables as $table)
{
$table = trim($table);