mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 22:09:48 +08:00
Start of new tests
This commit is contained in:
@@ -103,6 +103,46 @@ class QueryBuilderTest extends DatabaseTestCase
|
||||
$this->primaryKey(8)->check('value > 5'),
|
||||
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY CHECK (value > 5)'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_PK . ' FIRST',
|
||||
$this->primaryKey()->first(),
|
||||
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_PK . '(8) FIRST',
|
||||
$this->primaryKey(8)->first(),
|
||||
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_PK . ' AFTER (\'col_before\')',
|
||||
$this->primaryKey()->after('col_before'),
|
||||
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER (\'col_before\')'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_PK . ' AFTER (\'col_before\')',
|
||||
$this->primaryKey(8)->after('col_before'),
|
||||
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER (\'col_before\')'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_PK . ' FIRST',
|
||||
$this->primaryKey()->first()->after('col_before'),
|
||||
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER (\'col_before\')'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_PK . '(8) FIRST',
|
||||
$this->primaryKey(8)->first()->after('col_before'),
|
||||
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER (\'col_before\')'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_UNSIGNEDPK,
|
||||
$this->unsignedPrimaryKey(),
|
||||
'int(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_UNSIGNEDPK . '(20)',
|
||||
$this->primaryKey(20),
|
||||
'int(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_CHAR,
|
||||
$this->char(),
|
||||
|
||||
@@ -37,6 +37,16 @@ class SqliteQueryBuilderTest extends QueryBuilderTest
|
||||
$this->primaryKey(8)->check('value > 5'),
|
||||
'integer PRIMARY KEY AUTOINCREMENT NOT NULL CHECK (value > 5)'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_PK,
|
||||
$this->primaryKey()->first()->after('col_before'),
|
||||
'int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_PK . '(8)',
|
||||
$this->primaryKey(8)->first()->after('col_before'),
|
||||
'int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY'
|
||||
],
|
||||
[
|
||||
Schema::TYPE_CHAR,
|
||||
$this->char(),
|
||||
|
||||
Reference in New Issue
Block a user