Seafile CE 11.0.5 Upgrade - MySQL Warnings - Syntax Error

So generally… It looks like that mysql version does not fully support the syntax of the upgrade sql scripts - all those 1064 errors seem like that version 8.0.x of yours does not recognize the IF NOT EXISTS part of the SQL statements.

The reason for this looks like the same as mentioned in MySQL warning on upgrade 9 to 10

Having this in mind, we can work around those errors. Connect to the seahub database with e.g.
mysql --host localhost --protocol=tcp --port=3306 --user root -p dbseahub
(the last parameter is the database name, adapt to what you have in your seahub_settings.py), then enter the mysql root password.

Afterwards, enter the following statements:

ALTER TABLE `share_uploadlinkshare` ADD INDEX `share_uploadlinkshare_expire_date` (`expire_date`);
ALTER TABLE `org_saml_config` ADD COLUMN `domain` varchar(255) NOT NULL;
ALTER TABLE `org_saml_config` CHANGE domain domain varchar(255) DEFAULT NULL;
ALTER TABLE `org_saml_config` ADD COLUMN `dns_txt` varchar(64) NULL;
ALTER TABLE `org_saml_config` ADD COLUMN `domain_verified` TINYINT(1) NOT NULL DEFAULT 0;
ALTER TABLE `org_saml_config` ADD INDEX `org_saml_config_domain_verified_398065b9` (`domain_verified`);
ALTER TABLE `org_saml_config` ADD COLUMN `idp_certificate` longtext DEFAULT NULL;
UPDATE `org_saml_config` SET domain_verified=1 WHERE domain_verified=0;
COMMIT;

Last, exit from the mysql shell with
\q

1 Like