mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-16 23:48:16 +08:00
Fixes primary key columns being added to table creation test
This commit is contained in:
@ -959,9 +959,10 @@ abstract class QueryBuilderTest extends DatabaseTestCase
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($this->columnTypes() as $item) {
|
foreach ($this->columnTypes() as $item) {
|
||||||
list ($column, $builder, $expected) = $item;
|
list ($column, $builder, $expected) = $item;
|
||||||
if (!(strncmp($column, 'pk', 2) === 0 ||
|
if (!(strncmp($column, Schema::TYPE_PK, 2) === 0 ||
|
||||||
strncmp($column, 'bigpk', 5) === 0 ||
|
strncmp($column, Schema::TYPE_UPK, 3) === 0 ||
|
||||||
strncmp($column, 'unsignedpk', 10) === 0)) {
|
strncmp($column, Schema::TYPE_BIGPK, 5) === 0 ||
|
||||||
|
strncmp($column, Schema::TYPE_UBIGPK, 6) === 0)) {
|
||||||
$columns['col' . ++$i] = str_replace('CHECK (value', 'CHECK ([[col' . $i . ']]', $column);
|
$columns['col' . ++$i] = str_replace('CHECK (value', 'CHECK ([[col' . $i . ']]', $column);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user