From ad625c4c4175f1249da9f175ef7bd26675c7f705 Mon Sep 17 00:00:00 2001 From: Ruchit Patel Date: Thu, 18 Jul 2024 20:47:02 +0530 Subject: [PATCH] Update conditions. --- src/Traits/Rules.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Traits/Rules.php b/src/Traits/Rules.php index 16c9230..efb9f6d 100644 --- a/src/Traits/Rules.php +++ b/src/Traits/Rules.php @@ -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) {