From 7ab32ba236dba73fddbd138db41d517b44a8493c Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Sat, 8 Apr 2023 09:36:38 -0300 Subject: [PATCH] Use constants for DBAL types at `DB2Platform::initializeDoctrineTypeMappings()` --- src/Platforms/DB2Platform.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Platforms/DB2Platform.php b/src/Platforms/DB2Platform.php index c40a03e6d26..b92cbd684b4 100644 --- a/src/Platforms/DB2Platform.php +++ b/src/Platforms/DB2Platform.php @@ -101,21 +101,21 @@ public function getBlobTypeDeclarationSQL(array $column) protected function initializeDoctrineTypeMappings() { $this->doctrineTypeMapping = [ - 'bigint' => 'bigint', - 'binary' => 'binary', - 'blob' => 'blob', - 'character' => 'string', - 'clob' => 'text', - 'date' => 'date', - 'decimal' => 'decimal', - 'double' => 'float', - 'integer' => 'integer', - 'real' => 'float', - 'smallint' => 'smallint', - 'time' => 'time', - 'timestamp' => 'datetime', - 'varbinary' => 'binary', - 'varchar' => 'string', + 'bigint' => Types::BIGINT, + 'binary' => Types::BINARY, + 'blob' => Types::BLOB, + 'character' => Types::STRING, + 'clob' => Types::TEXT, + 'date' => Types::DATE_MUTABLE, + 'decimal' => Types::DECIMAL, + 'double' => Types::FLOAT, + 'integer' => Types::INTEGER, + 'real' => Types::FLOAT, + 'smallint' => Types::SMALLINT, + 'time' => Types::TIME_MUTABLE, + 'timestamp' => Types::DATETIME_MUTABLE, + 'varbinary' => Types::BINARY, + 'varchar' => Types::STRING, ]; }