Skip to content

Commit b1bec0a

Browse files
authored
Merge pull request #61 from ruchit288/main
Update conditions.
2 parents c6c1d3b + ad625c4 commit b1bec0a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Traits/Rules.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,10 @@ public function fieldRules(string $tableName): array
119119
$dataTypeDetails = $this->getFieldDataType($tableName, $field);
120120
$checkFields[$field]['datatype'] = $dataTypeDetails;
121121

122-
if (connection_driver() === 'mysql' && $dataTypeDetails['data_type'] === Constant::DATATYPE_VARCHAR
122+
if (connection_driver() === Constant::MYSQL_DB && $dataTypeDetails['data_type'] === Constant::DATATYPE_VARCHAR
123123
&& $dataTypeDetails['size'] <= Constant::DATATYPE_VARCHAR_SIZE
124124
) {
125125
$checkFields[$field]['suggestion'] = __('Lang::messages.standard.error_message.datatype_change');
126-
} elseif (connection_driver() === 'mysql') {
127-
$checkFields[$field]['suggestion'] = __('Lang::messages.standard.error_message.datatype_change');
128126
}
129127
}
130128
} catch (Exception $exception) {

0 commit comments

Comments
 (0)