Database migration version 3.4 → 3.5 fails because "Index column size too large."

When trying to perform the manual database migration from version 3.4 to 3.5 in the developer edition the following error occurs:

root@0413a9e9cc5d:/opt/seatable# mysql -h$DB_HOST -p$DB_ROOT_PASSWD dtable_db -v </opt/seatable/seatable-server-latest/sql/mysql/upgrade/3.5/dtable.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
--------------
CREATE TABLE IF NOT EXISTS `admin_log_orgadminlog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(254) NOT NULL,
  `operation` varchar(255) NOT NULL,
  `detail` longtext NOT NULL,
  `datetime` datetime(6) NOT NULL,
  `org_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `admin_log_orgadminlog_email_7213c993`(`email`),
  KEY `admin_log_orgadminlog_operation_4bad7bd1`(`operation`),
  KEY `admin_log_org_id`(`org_id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8
--------------

--------------
ALTER TABLE `webhook_jobs` MODIFY COLUMN `response_body` longtext
--------------

--------------
ALTER TABLE `profile_profile` CHANGE `contact_email` `contact_email` varchar(225) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL
--------------

ERROR 1709 (HY000) at line 16: Index column size too large. The maximum column size is 767 bytes

Is there any way I can increase the limit? Running MariaDB 11.0.2 database server, but of course the seatable database has been initialized many moons ago :sweat_smile:

You can try executing the following command in mysql

set global innodb_file_format = BARRACUDA;
set global innodb_large_prefix = ON;
set global innodb_file_per_table = ON;
set global innodb_default_row_format = DYNAMIC;

use dtable_db;

alter table profile_profile ROW_FORMAT=DYNAMIC;

ALTER TABLE `profile_profile` CHANGE `contact_email` `contact_email` varchar(225) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL;

Refer to: database - MySQL error: The maximum column size is 767 bytes - Stack Overflow

Thanks @dzmbbs!
But I believe these exact global variables are supported anymore in MariaDB 11.

MariaDB [(none)]> set global innodb_file_format = BARRACUDA;
ERROR 1193 (HY000): Unknown system variable 'innodb_file_format'

However setting these doesn’t seem to be required, I was able to complete the action with just the ALTER TABLE commands.

use dtable_db;
ALTER TABLE `profile_profile` ROW_FORMAT=DYNAMIC;
ALTER TABLE `profile_profile` CHANGE `contact_email` `contact_email` varchar(225) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL;

Thank you so much! :pray:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.