SQLitePlatform extends SQLitePlatform
doctrine/dbal 4+ removed the old doctrine event system. The new way is to extend the platform class(es) and directly override the methods instead of consuming events. Therefore, we need to extend the platform classes to provide some changes for TYPO3 database schema operations.
SQLite is dynamically typed and stores the declared column type verbatim, which is what
pragma_table_info reports back. That allows declaring dedicated type names for Doctrine types
SQLite has no native counterpart for, and mapping them back on introspection - instead of writing
a (DC2Type:<name>) column comment as the only way to recover the type.
Avoiding that comment is not cosmetic: SQLite cannot parse an inline comment in the simplified
ALTER TABLE <table> ADD COLUMN <definition> form doctrine emits, so adding such a column to an
existing table failed with "incomplete input".
Existing installations are not affected. Columns created before this carry CLOB/CHAR(36) plus
the type comment and are still resolved to the same Doctrine type by
SQLiteSchemaManager. Schema comparison uses
the generated column declaration, not the stored database type, so no change is detected.
not part of Public Core API.
Table of Contents
Methods
- getGuidTypeDeclarationSQL() : string
- getJsonTypeDeclarationSQL() : string
- initializeDoctrineTypeMappings() : void
Methods
getGuidTypeDeclarationSQL()
public
getGuidTypeDeclarationSQL(array<string, mixed> $column) : string
Parameters
- $column : array<string, mixed>
Return values
stringgetJsonTypeDeclarationSQL()
public
getJsonTypeDeclarationSQL(array<string, mixed> $column) : string
Parameters
- $column : array<string, mixed>
Return values
stringinitializeDoctrineTypeMappings()
protected
initializeDoctrineTypeMappings() : void