File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,17 @@ private static function getDefinitionColumn(Query\MysqlColumnType $stmt) : Colum
163163 return new Column \Decimal ($ stmt ->length , $ stmt ->decimals );
164164
165165 case DataType::BINARY :
166+ if ($ stmt ->length === null ) {
167+ throw new \UnexpectedValueException ('length should not be null ' );
168+ }
169+
170+ return new Column \Binary ($ stmt ->length , 'binary ' , 'binary ' );
171+
166172 case DataType::CHAR :
173+ if ($ stmt ->length === null ) {
174+ throw new \UnexpectedValueException ('length should not be null ' );
175+ }
176+
167177 return new Column \Char ($ stmt ->length );
168178
169179 case DataType::ENUM :
Original file line number Diff line number Diff line change 1+ <?php
2+ namespace Vimeo \MysqlEngine \Schema \Column ;
3+
4+ use Pov \Definition \MySqlDefinition ;
5+
6+ class Binary extends CharacterColumn implements StringColumn, Defaultable
7+ {
8+ use MySqlDefaultTrait;
9+ }
You can’t perform that action at this time.
0 commit comments