Skip to content

Commit

Permalink
make update script compatible with tidb
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed May 17, 2024
1 parent dacf44d commit a58c30f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/Updates/1.2-rc1.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ public function getMigrations(Updater $updater)
return array(
// Various performance improvements schema updates
$this->migration->db->sql('ALTER TABLE `' . Common::prefixTable('log_visit') . '`
DROP `visit_server_date`,
DROP INDEX `index_idsite_date_config`,
DROP INDEX `index_idsite_datetime_config`,
', array(Updater\Migration\Db::ERROR_CODE_UNKNOWN_COLUMN, Updater\Migration\Db::ERROR_CODE_COLUMN_NOT_EXISTS)),
$this->migration->db->sql('ALTER TABLE `' . Common::prefixTable('log_visit') . '`
DROP `visit_server_date`,
ADD `idvisitor` BINARY(8) NOT NULL AFTER `idsite`,
ADD `config_id` BINARY(8) NOT NULL AFTER `config_md5config`
', array(Updater\Migration\Db::ERROR_CODE_UNKNOWN_COLUMN, Updater\Migration\Db::ERROR_CODE_COLUMN_NOT_EXISTS)),
Expand Down

0 comments on commit a58c30f

Please sign in to comment.