fixed mysql defaul integer display width on unsigned pk

fixes #11541
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
Carsten Brandt
2016-08-08 10:47:34 +02:00
gitea-unlock(16/)
parent 10ba47d841
commit 85d89e4893
octicon-diff(16/tw-mr-1) 3 changed files with 3 additions and 2 deletions

1
framework/CHANGELOG.md
View File

@@ -18,6 +18,7 @@ Yii Framework 2 Change Log
- Bug #12045: Added missing `LEVEL_PROFILE` to `yii\log\Logger::getLevelName()` map (Mak-Di)
- Bug #10681: Reverted fix of beforeValidate event calling in `yii.activeForm.js` (silverfire)
- Bug #11715: Fixed JS validation when the same model's attribute file input is listed more than once on the same page (uaoleg)
- Bug #11541: Fixed default MySQL integer display width for unsigned primary key (h311ion, rob006, cebe)
- Enh #10583: Do not silence session errors in debug mode (samdark)
- Enh #11804: Added `yii\behaviors\AttributeTypecastBehavior` for maintaining of strict ActiveRecord attribute types (klimov-paul)
- Enh #12048: Improved message extraction command performance (samdark)

2
framework/db/mysql/QueryBuilder.php
View File

@@ -24,7 +24,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
*/
public $typeMap = [
Schema::TYPE_PK => 'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY',
Schema::TYPE_UPK => 'int(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',
Schema::TYPE_UPK => 'int(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',
Schema::TYPE_BIGPK => 'bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY',
Schema::TYPE_UBIGPK => 'bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',
Schema::TYPE_CHAR => 'char(1)',