mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Changed SQLite fix #11652 according to https://github.com/yiisoft/yii2/pull/11653#issuecomment-224016289
This commit is contained in:
@ -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',
|
||||||
|
@ -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(),
|
||||||
|
@ -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',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
Reference in New Issue
Block a user