Explorar el Código

优化数据库备注

evoxwht hace 2 años
padre
commit
df0fd9a47a
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      crmeb/app/adminapi/controller/v1/system/SystemDatabackup.php

+ 3 - 2
crmeb/app/adminapi/controller/v1/system/SystemDatabackup.php

@@ -63,13 +63,14 @@ class SystemDatabackup extends AuthController
      */
     public function updateMark()
     {
-        [$table, $field, $type, $mark] = $this->request->postMore([
+        [$table, $field, $type, $mark, $is_field] = $this->request->postMore([
             ['table', ''],
             ['field', ''],
             ['type', ''],
             ['mark', ''],
+            ['is_field', 0],
         ], true);
-        if ($field == '') {
+        if ($is_field == 0) {
             $sql = "ALTER TABLE $table COMMENT '$mark'";
         } else {
             $sql = "ALTER TABLE $table MODIFY COLUMN $field $type COMMENT '$mark'";