star7th 7 years ago
parent
commit
9ccaade858

BIN
Sqlite/showdoc.db.php


+ 2 - 0
install/ajax.php

@@ -68,6 +68,8 @@ function write_home_config(){
         $config .= "
         $config .= "
 return array(
 return array(
 	//'配置项'=>'配置值'
 	//'配置项'=>'配置值'
+    'DB_TYPE'   => 'Sqlite', 
+    'DB_NAME'   => './Sqlite/showdoc.db.php', 
     'LANG_SWITCH_ON' => true,   // 开启语言包功能
     'LANG_SWITCH_ON' => true,   // 开启语言包功能
     'LANG_AUTO_DETECT' => false, // 自动侦测语言 开启多语言功能后有效
     'LANG_AUTO_DETECT' => false, // 自动侦测语言 开启多语言功能后有效
     'DEFAULT_LANG' => '{$DEFAULT_LANG}', // 默认语言
     'DEFAULT_LANG' => '{$DEFAULT_LANG}', // 默认语言

+ 30 - 0
server/Application/Home/Controller/UpdateController.class.php

@@ -192,6 +192,36 @@ class UpdateController extends BaseController {
              D("User")->add(array('username'=>"showdoc" ,"groupid"=>1,'password'=>"a89da13684490eb9ec9e613f91d24d00" , 'reg_time'=>time()));
              D("User")->add(array('username'=>"showdoc" ,"groupid"=>1,'password'=>"a89da13684490eb9ec9e613f91d24d00" , 'reg_time'=>time()));
         }
         }
 
 
+        //item表增加is_del字段
+        $columns = M("Item")->getDbFields();
+        if ($columns) {
+            $has_it = 0 ;//是否存在该字段
+            foreach ($columns as $key => $value) {
+                if ($value == 'is_del') {
+                    $has_it = 1 ;
+                }
+            }
+            if ($has_it === 0) {
+                $sql = "ALTER TABLE ".C('DB_PREFIX')."item ADD is_del INT( 1 ) NOT NULL DEFAULT '0'  ;";
+                D("Item")->execute($sql);
+            }
+        }
+
+        //page表增加is_del字段
+        $columns = M("Page")->getDbFields();
+        if ($columns) {
+            $has_it = 0 ;//是否存在该字段
+            foreach ($columns as $key => $value) {
+                if ($value == 'is_del') {
+                    $has_it = 1 ;
+                }
+            }
+            if ($has_it === 0) {
+                $sql = "ALTER TABLE ".C('DB_PREFIX')."page ADD is_del INT( 1 ) NOT NULL DEFAULT '0'  ;";
+                D("Page")->execute($sql);
+            }
+        }
+
         echo 'OK!';
         echo 'OK!';
     }
     }