* Fix bug #26359. Optimize detail styles for creating documents.

This commit is contained in:
hufangzhou
2022-08-12 15:05:00 +08:00
parent d32cf5d6e2
commit c7f587ef5a
7 changed files with 34 additions and 32 deletions
+22
View File
@@ -532,6 +532,15 @@ class upgradeModel extends model
break;
case '17_4':
$this->updateSearchIndex();
if(!$executedXuanxuan)
{
$table = $this->config->db->prefix . 'im_chat';
$result = $this->checkFieldsExists($table, 'adminInvite');
if($result->rowCount() == 0)
{
$this->dbh->query("ALTER TABLE $table ADD `adminInvite` enum('0','1') NOT NULL DEFAULT '0' AFTER `mergedChats`");
}
}
break;
}
@@ -7036,4 +7045,17 @@ class upgradeModel extends model
return !dao::isError();
}
/**
* Check whether the field exists.
*
* @param string $table
* @param string $field
* @access public
* @return object
*/
public function checkFieldsExists($table, $field)
{
return $this->dbh->query("show columns from `$table` like '$field'");
}
}