mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Fixes #13814: MySQL unique index names can now contain spaces
This commit is contained in:
committed by
Alexander Makarov
parent
940377ce56
commit
a2a79a70eb
@ -531,6 +531,16 @@ abstract class SchemaTest extends DatabaseTestCase
|
||||
'somecolUnique' => ['somecol'],
|
||||
'someCol2Unique' => ['someCol2'],
|
||||
], $uniqueIndexes);
|
||||
|
||||
// see https://github.com/yiisoft/yii2/issues/13814
|
||||
$db->createCommand()->createIndex('another unique index', 'uniqueIndex', 'someCol2', true)->execute();
|
||||
|
||||
$uniqueIndexes = $schema->findUniqueIndexes($schema->getTableSchema('uniqueIndex', true));
|
||||
$this->assertEquals([
|
||||
'somecolUnique' => ['somecol'],
|
||||
'someCol2Unique' => ['someCol2'],
|
||||
'another unique index' => ['someCol2'],
|
||||
], $uniqueIndexes);
|
||||
}
|
||||
|
||||
public function testContraintTablesExistance()
|
||||
|
||||
Reference in New Issue
Block a user