doctrine/dbal

NVARCHAR(MAX) length for portableTableColumnDefiniton should not be divided

オープン

#6,038 opened on 2023/05/15

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)PHP (1,374 件のフォーク)batch import
BugHelp wantedSQL ServerSchema IntrospectionSchema Management

Repository metrics

Stars
 (9,693 個のスター)
PR merge metrics
 (平均マージ 12h 52m) (30d で 46 merged PRs)

説明

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.

コントリビューターガイド