star7th 7 年之前
父節點
當前提交
9ccaade858
共有 3 個文件被更改,包括 32 次插入0 次删除
  1. 二進制
      Sqlite/showdoc.db.php
  2. 2 0
      install/ajax.php
  3. 30 0
      server/Application/Home/Controller/UpdateController.class.php

二進制
Sqlite/showdoc.db.php


+ 2 - 0
install/ajax.php

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