+1 vote
in Gitea by
How to Upgrade errors with MySQL in Gitea?

1 Answer

0 votes
by

If you are receiving errors on upgrade of Gitea using MySQL that read:

ORM engine initialization failed: migrate: do migrate: Error: 1118: Row size too large...

Please run gitea convert or run ALTER TABLE table_name ROW_FORMAT=dynamic; for each table in the database.

The underlying problem is that the space allocated for indices by the default row format is too small. Gitea requires that the ROWFORMAT for its tables is DYNAMIC.

If you are receiving an error line containing Error 1071: Specified key was too long; max key length is 1000 bytes... then you are attempting to run Gitea on tables which use the ISAM engine. While this may have worked by chance in previous versions of Gitea, it has never been officially supported and you must use InnoDB. You should run ALTER TABLE table_name ENGINE=InnoDB; for each table in the database.
If you are using MySQL 5, another possible fix is

SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_large_prefix=1;

Related questions

+1 vote
asked Jan 12, 2022 in Gitea by DavidAnderson
+1 vote
asked Jan 13, 2022 in Gitea by DavidAnderson
...