This commit is contained in:
Alexander Makarov
2016-06-06 19:57:42 +03:00
parent 0a60466729
commit 7cea46bcb4
3 changed files with 5 additions and 5 deletions

View File

@ -28,8 +28,8 @@ class QueryBuilder extends \yii\db\QueryBuilder
public $typeMap = [ public $typeMap = [
Schema::TYPE_PK => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL', Schema::TYPE_PK => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL',
Schema::TYPE_UPK => 'integer UNSIGNED PRIMARY KEY AUTOINCREMENT NOT NULL', Schema::TYPE_UPK => 'integer UNSIGNED PRIMARY KEY AUTOINCREMENT NOT NULL',
Schema::TYPE_BIGPK => 'bigint PRIMARY KEY NOT NULL', Schema::TYPE_BIGPK => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL',
Schema::TYPE_UBIGPK => 'bigint UNSIGNED PRIMARY KEY NOT NULL', Schema::TYPE_UBIGPK => 'integer UNSIGNED PRIMARY KEY AUTOINCREMENT NOT NULL',
Schema::TYPE_CHAR => 'char(1)', Schema::TYPE_CHAR => 'char(1)',
Schema::TYPE_STRING => 'varchar(255)', Schema::TYPE_STRING => 'varchar(255)',
Schema::TYPE_TEXT => 'text', Schema::TYPE_TEXT => 'text',

View File

@ -61,7 +61,7 @@ class m141106_185632_log_init extends Migration
} }
$this->createTable($target->logTable, [ $this->createTable($target->logTable, [
'id' => $this->db->driverName === 'sqlite' ? $this->primaryKey() : $this->bigPrimaryKey(), 'id' => $this->bigPrimaryKey(),
'level' => $this->integer(), 'level' => $this->integer(),
'category' => $this->string(), 'category' => $this->string(),
'log_time' => $this->double(), 'log_time' => $this->double(),

View File

@ -124,7 +124,7 @@ abstract class QueryBuilderTest extends DatabaseTestCase
[ [
'mysql' => 'bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY', 'mysql' => 'bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY',
'postgres' => 'bigserial NOT NULL PRIMARY KEY', 'postgres' => 'bigserial NOT NULL PRIMARY KEY',
'sqlite' => 'bigint PRIMARY KEY NOT NULL', 'sqlite' => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL',
], ],
], ],
[ [
@ -891,7 +891,7 @@ abstract class QueryBuilderTest extends DatabaseTestCase
[ [
'mysql' => 'bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY', 'mysql' => 'bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',
'postgres' => 'bigserial NOT NULL PRIMARY KEY', 'postgres' => 'bigserial NOT NULL PRIMARY KEY',
'sqlite' => 'bigint UNSIGNED PRIMARY KEY NOT NULL', 'sqlite' => 'integer UNSIGNED PRIMARY KEY AUTOINCREMENT NOT NULL',
], ],
], ],
[ [