Skip to content

Commit

Permalink
Reverted 0bf2dad: it's very common to use lower case for column types…
Browse files Browse the repository at this point in the history
… and upper case for other DB keywords.
  • Loading branch information
qiangxue committed Sep 14, 2013
1 parent 6015312 commit 6fe152d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion framework/yii/db/cubrid/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
* @var array mapping from abstract column types (keys) to physical column types (values).
*/
public $typeMap = array(
Schema::TYPE_PK => 'int not null auto_increment primary key',
Schema::TYPE_PK => 'int NOT NULL AUTO_INCREMENT PRIMARY KEY',
Schema::TYPE_STRING => 'varchar(255)',
Schema::TYPE_TEXT => 'varchar',
Schema::TYPE_SMALLINT => 'smallint',
Expand Down
2 changes: 1 addition & 1 deletion framework/yii/db/mssql/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
* @var array mapping from abstract column types (keys) to physical column types (values).
*/
public $typeMap = array(
Schema::TYPE_PK => 'int identity primary key',
Schema::TYPE_PK => 'int IDENTITY PRIMARY KEY',
Schema::TYPE_STRING => 'varchar(255)',
Schema::TYPE_TEXT => 'text',
Schema::TYPE_SMALLINT => 'smallint(6)',
Expand Down
2 changes: 1 addition & 1 deletion framework/yii/db/mysql/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
* @var array mapping from abstract column types (keys) to physical column types (values).
*/
public $typeMap = array(
Schema::TYPE_PK => 'int(11) not null auto_increment primary key',
Schema::TYPE_PK => 'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY',
Schema::TYPE_STRING => 'varchar(255)',
Schema::TYPE_TEXT => 'text',
Schema::TYPE_SMALLINT => 'smallint(6)',
Expand Down
2 changes: 1 addition & 1 deletion framework/yii/db/pgsql/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
* @var array mapping from abstract column types (keys) to physical column types (values).
*/
public $typeMap = array(
Schema::TYPE_PK => 'serial not null primary key',
Schema::TYPE_PK => 'serial NOT NULL PRIMARY KEY',
Schema::TYPE_STRING => 'varchar(255)',
Schema::TYPE_TEXT => 'text',
Schema::TYPE_SMALLINT => 'smallint',
Expand Down
2 changes: 1 addition & 1 deletion framework/yii/db/sqlite/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
* @var array mapping from abstract column types (keys) to physical column types (values).
*/
public $typeMap = array(
Schema::TYPE_PK => 'integer primary key autoincrement not null',
Schema::TYPE_PK => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL',
Schema::TYPE_STRING => 'varchar(255)',
Schema::TYPE_TEXT => 'text',
Schema::TYPE_SMALLINT => 'smallint',
Expand Down
1 change: 0 additions & 1 deletion tests/unit/framework/db/sqlite/SqliteQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace yiiunit\framework\db\sqlite;

use yii\base\NotSupportedException;
use yii\db\sqlite\Schema;
use yiiunit\framework\db\QueryBuilderTest;

Expand Down

0 comments on commit 6fe152d

Please sign in to comment.