We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b709f40 commit 018f629Copy full SHA for 018f629
src/Resolvers/SchemaRulesResolverMySql.php
@@ -92,6 +92,8 @@ protected function generateColumnRules(stdClass $column): array
92
$intType = $type->before(' unsigned')->__toString();
93
94
// prevent int(xx) for mysql
95
+ $intType = preg_replace("/\([^)]+\)/", "", $intType);
96
+
97
if(!array_key_exists($intType, self::$integerTypes)){
98
$intType = "int";
99
}
@@ -115,7 +117,7 @@ protected function generateColumnRules(stdClass $column): array
115
117
$columnRules[] = 'in:'.implode(',', $matches[1]);
116
118
119
break;
- case $type == 'year':
120
+ case $type->contains('year'):
121
$columnRules[] = 'integer';
122
$columnRules[] = 'min:1901';
123
$columnRules[] = 'max:2155';
0 commit comments