CTOOLS 7.X-1.12 TO 7.X-1.13 更新出錯

CHAOS TOOL SUITE (CTOOLS) 7.X-1.12 TO 7.X-1.13 更新出錯

Failed: PDOException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes: ALTER TABLE {ctools_object_cache} CHANGE `name` `name` VARCHAR(255) NOT NULL; Array ( ) in db_change_field() (lige 3076 in /Sites/example.com/includes/database/database.inc)

我發現問題只有出現在D6 to D7的站


解決的方式,使用phpMyadmin執行sql
ALTER TABLE `ctools_object_cache` ENGINE = InnoDB;

 

然後再重跑次updatedb,就不會再出現錯誤訊息了

 

解法來源:https://www.drupal.org/project/ctools/issues/2941920

other method

>mysql -ppassword 

>use database;

ALTER TABLE table_name ENGINE=InnoDB;

Converting an Existing Table

To convert a non-InnoDB table to use InnoDB use ALTER TABLE:

ALTER TABLE table_name ENGINE=InnoDB;

Important

Do not convert MySQL system tables in the mysql database from MyISAM to the InnoDB type. This is an unsupported operation. type.

Cloning the Structure of a Table
Tags