Added Sqlite migrations required by new doctrine/orm version and fixed migration duplication for sqlite

This commit is contained in:
Jan Böhmer 2024-06-10 21:54:15 +02:00
parent 427b8659c9
commit 8ee3aaf4f4
2 changed files with 174 additions and 4 deletions

View file

@ -35,8 +35,10 @@ class TinyIntType extends Type
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
//MySQL and SQLite know the TINYINT type directly
if ($platform instanceof AbstractMySQLPlatform || $platform instanceof SQLitePlatform) {
//MySQL knows the TINYINT type directly
//We do not use the TINYINT for sqlite, as it will be resolved to a BOOL type and bring problems with migrations
if ($platform instanceof AbstractMySQLPlatform ) {
//Use TINYINT(1) to allow for proper migration diffs
return 'TINYINT(1)';
}