doctrine/dbal
NVARCHAR(MAX) length for portableTableColumnDefiniton should not be divided
Aperta
#6038 aperta il 15 mag 2023
BugHelp wantedSQL ServerSchema IntrospectionSchema Management
Metriche repository
- Star
- (9693 stelle)
- Metriche merge PR
- (Merge medio 12h 52m) (46 PR mergiate in 30 g)
Descrizione
Bug Report
When introspecting a schema from an SqlServer database a nvarchar(max) a TypeError is raised. Apparently this happens because the length of an nvarchar is divided by two in the SQLServerSchemaManager::getPortableTableColunmnDefinition. As the MAX length is read as -1 this leads to a float length (-0.5).
This can be simply reproduced by introspecting a SqlServer database schema containing a nvarchar(max) column.