We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad10660 commit b709f40Copy full SHA for b709f40
src/Resolvers/SchemaRulesResolverMySql.php
@@ -90,6 +90,12 @@ protected function generateColumnRules(stdClass $column): array
90
$columnRules[] = "integer";
91
$sign = ($type->contains('unsigned')) ? 'unsigned' : 'signed' ;
92
$intType = $type->before(' unsigned')->__toString();
93
+
94
+ // prevent int(xx) for mysql
95
+ if(!array_key_exists($intType, self::$integerTypes)){
96
+ $intType = "int";
97
+ }
98
99
$columnRules[] = "min:".self::$integerTypes[$intType][$sign][0];
100
$columnRules[] = "max:".self::$integerTypes[$intType][$sign][1];
101
0 commit comments