Skip to content

Commit 5d0d6f4

Browse files
authored
Fix #19705: Add binary and other data type to $typeMap list for MySQL
1 parent 7c07885 commit 5d0d6f4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

framework/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Yii Framework 2 Change Log
44
2.0.48 under development
55
------------------------
66

7+
- Bug #19705: Add binary and other data type to `$typeMap` list for MySQL (sohelahmed7)
78
- Enh #19741: Added option to use a closure for `$variations` definition in `yii\filters\PageCache` (nadar)
89
- Bug #15376: Added $userId for RBAC roles cache (manchenkoff)
910
- Bug #18867: Fixed multiple issues with `yii\grid\CheckboxColumn`: "check all" checkbox not being checked on page load when all data row checkboxes are initially checked; clicking checkboxes triggered "change" event for other checkboxes that do not change their state; "check all" checkbox not being checked when disabled checkboxes are present and clicking last non-checked data row checkbox (PowerGamer1)

framework/db/mysql/Schema.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class Schema extends \yii\db\Schema implements ConstraintFinderInterface
4545
*/
4646
public $typeMap = [
4747
'tinyint' => self::TYPE_TINYINT,
48+
'bool' => self::TYPE_TINYINT,
49+
'boolean' => self::TYPE_TINYINT,
4850
'bit' => self::TYPE_INTEGER,
4951
'smallint' => self::TYPE_SMALLINT,
5052
'mediumint' => self::TYPE_INTEGER,
@@ -53,9 +55,12 @@ class Schema extends \yii\db\Schema implements ConstraintFinderInterface
5355
'bigint' => self::TYPE_BIGINT,
5456
'float' => self::TYPE_FLOAT,
5557
'double' => self::TYPE_DOUBLE,
58+
'double precision' => self::TYPE_DOUBLE,
5659
'real' => self::TYPE_FLOAT,
5760
'decimal' => self::TYPE_DECIMAL,
5861
'numeric' => self::TYPE_DECIMAL,
62+
'dec' => self::TYPE_DECIMAL,
63+
'fixed' => self::TYPE_DECIMAL,
5964
'tinytext' => self::TYPE_TEXT,
6065
'mediumtext' => self::TYPE_TEXT,
6166
'longtext' => self::TYPE_TEXT,
@@ -71,6 +76,8 @@ class Schema extends \yii\db\Schema implements ConstraintFinderInterface
7176
'time' => self::TYPE_TIME,
7277
'timestamp' => self::TYPE_TIMESTAMP,
7378
'enum' => self::TYPE_STRING,
79+
'set' => self::TYPE_STRING,
80+
'binary' => self::TYPE_BINARY,
7481
'varbinary' => self::TYPE_BINARY,
7582
'json' => self::TYPE_JSON,
7683
];

0 commit comments

Comments
 (0)