File tree 2 files changed +19
-0
lines changed
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
163
163
return new Column \Decimal ($ stmt ->length , $ stmt ->decimals );
164
164
165
165
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
+
166
172
case DataType::CHAR :
173
+ if ($ stmt ->length === null ) {
174
+ throw new \UnexpectedValueException ('length should not be null ' );
175
+ }
176
+
167
177
return new Column \Char ($ stmt ->length );
168
178
169
179
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