Browse Source

Schema Builder Patterns Excel document in /docs folder (temp storage).

Fixed some schema builder patterns.
Added more information to upgrade docs.
tags/2.0.8
Chris Harris 9 years ago
parent
commit
5c4001d84b
  1. BIN
      docs/schema-builder-patterns.xlsx
  2. 5
      framework/UPGRADE.md
  3. 2
      framework/db/ColumnSchemaBuilder.php
  4. 2
      framework/db/cubrid/ColumnSchemaBuilder.php
  5. 2
      framework/db/oci/ColumnSchemaBuilder.php
  6. 2
      framework/db/sqlite/ColumnSchemaBuilder.php

BIN
docs/schema-builder-patterns.xlsx

Binary file not shown.

5
framework/UPGRADE.md

@ -20,10 +20,9 @@ ______________________
* The signature of `yii\helpers\BaseArrayHelper::index()` was changed. The method has got an extra optional parameter
`$groupBy`.
* The signature of `yii\db\ColumnSchemaBuilder::__construct()` was changed. The method has got an extra optional parameter `$db`.
* String types in the MySQL column schema map were upgraded to unicode storage types.
* The signature of `yii\db\ColumnSchemaBuilder::__construct()` was changed. The method has got an extra optional parameter `$db`. In case you are instantiating this class yourself and using the `$config` parameter, you will need to move it to the right by one.
* String types in the MSSQL column schema map were upgraded to Unicode storage types. This will have no effect on existing columns, but any new columns you generate via the migrations engine will now store data as Unicode.
Upgrade from Yii 2.0.6
----------------------

2
framework/db/ColumnSchemaBuilder.php

@ -225,7 +225,7 @@ class ColumnSchemaBuilder extends Object
{
switch ($this->getTypeCategory()) {
case self::CATEGORY_PK:
$format = '{type}{length}{check}';
$format = '{type}{check}';
break;
default:
$format = '{type}{length}{notnull}{unique}{default}{check}';

2
framework/db/cubrid/ColumnSchemaBuilder.php

@ -50,7 +50,7 @@ class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
{
switch ($this->getTypeCategory()) {
case self::CATEGORY_PK:
$format = '{type}{length}{check}{pos}';
$format = '{type}{check}{pos}';
break;
case self::CATEGORY_NUMERIC:
$format = '{type}{length}{unsigned}{notnull}{unique}{default}{check}{pos}';

2
framework/db/oci/ColumnSchemaBuilder.php

@ -50,7 +50,7 @@ class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
{
switch ($this->getTypeCategory()) {
case self::CATEGORY_PK:
$format = '{type}{length}{check}{pos}';
$format = '{type}{length}{unsigned}{check}{pos}';
break;
case self::CATEGORY_NUMERIC:
$format = '{type}{length}{unsigned}{default}{notnull}{check}{pos}';

2
framework/db/sqlite/ColumnSchemaBuilder.php

@ -33,7 +33,7 @@ class ColumnSchemaBuilder extends AbstractColumnSchemaBuilder
{
switch ($this->getTypeCategory()) {
case self::CATEGORY_PK:
$format = '{type}{length}{check}';
$format = '{type}{unsigned}{check}';
break;
case self::CATEGORY_NUMERIC:
$format = '{type}{length}{unsigned}{notnull}{unique}{check}{default}';

Loading…
Cancel
Save