-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Feature Description
This issue was drafted with assistance from an AI tool, due to my limited English proficiency.
Environment
- Gitea self hosted version: 1.24.6
- Wampserver 3.3.5 64 bit
- Apache 2.4.59
- PHP 8.2.18
- MySQL 8.3.0
- Windows Server 2022 21H2
Problem:
When installing Gitea on a MySQL/MariaDB server where default-storage-engine
is set to MyISAM
, Gitea creates tables using MyISAM. This breaks core functionality such as foreign keys, transactions, and constraints, since MyISAM does not support them.
Expected behavior:
Gitea should either:
Explicitly create tables with ENGINE=InnoDB
when using MySQL/MariaDB.
Or allow configuration of the storage engine via app.ini
, e.g. DB_ENGINE = InnoDB
.
Why this matters:
Some environments use MyISAM as the global default for legacy or compatibility reasons. Changing the global setting is not always acceptable, especially when other databases depend on it. Platforms like GitHub Enterprise explicitly require InnoDB for MySQL-based setups, reinforcing the importance of this compatibility. Gitea should ensure compatibility without requiring global server changes.
Suggested fix:
Add a config option in app.ini
to specify the desired storage engine.
Or hardcode ENGINE=InnoDB
in the table creation logic for MySQL/MariaDB.
This would improve robustness and avoid silent misconfigurations that lead to broken installations.
Screenshots
No response