mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 20:04:34 +02:00
Added Sqlite migrations required by new doctrine/orm version and fixed migration duplication for sqlite
This commit is contained in:
parent
427b8659c9
commit
8ee3aaf4f4
2 changed files with 174 additions and 4 deletions
|
@ -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)';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue