Skip to content

Commit

Permalink
Merge pull request #61 from ruchit288/main
Browse files Browse the repository at this point in the history
Update conditions.
  • Loading branch information
ruchit288 authored Jul 18, 2024
2 parents c6c1d3b + ad625c4 commit b1bec0a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Traits/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,10 @@ public function fieldRules(string $tableName): array
$dataTypeDetails = $this->getFieldDataType($tableName, $field);
$checkFields[$field]['datatype'] = $dataTypeDetails;

if (connection_driver() === 'mysql' && $dataTypeDetails['data_type'] === Constant::DATATYPE_VARCHAR
if (connection_driver() === Constant::MYSQL_DB && $dataTypeDetails['data_type'] === Constant::DATATYPE_VARCHAR
&& $dataTypeDetails['size'] <= Constant::DATATYPE_VARCHAR_SIZE
) {
$checkFields[$field]['suggestion'] = __('Lang::messages.standard.error_message.datatype_change');
} elseif (connection_driver() === 'mysql') {
$checkFields[$field]['suggestion'] = __('Lang::messages.standard.error_message.datatype_change');
}
}
} catch (Exception $exception) {
Expand Down

0 comments on commit b1bec0a

Please sign in to comment.