[Mssql 2012] Index with included column #5130

Open
opened 2026-01-22 14:59:08 +01:00 by admin · 0 comments
Owner

Originally created by @Slavenin on GitHub (May 20, 2016).

Hi!
In ms sql has included index column https://msdn.microsoft.com/en-gb/library/ms190806(v=sql.110).aspx

But if in db exists such index doctrine throw exception:

[Doctrine\DBAL\Schema\SchemaException]
An index with name 'idx_609f9fc92a0f2bbf' was already defined on table 'table'.

Exception trace:
() at C:\www\mbarulin.sozd.srvdev.ru\vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\SchemaException.php:75
Doctrine\DBAL\Schema\SchemaException::indexAlreadyExists() at C:\www\mbarulin.sozd.srvdev.ru\vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\Table.php:510
Doctrine\DBAL\Schema\Table->_addIndex() at C:\www\mbarulin.sozd.srvdev.ru\vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\Table.php:562

Originally created by @Slavenin on GitHub (May 20, 2016). Hi! In ms sql has included index column https://msdn.microsoft.com/en-gb/library/ms190806(v=sql.110).aspx But if in db exists such index doctrine throw exception: > [Doctrine\DBAL\Schema\SchemaException] > An index with name 'idx_609f9fc92a0f2bbf' was already defined on table 'table'. > > Exception trace: > () at C:\www\mbarulin.sozd.srvdev.ru\vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\SchemaException.php:75 > Doctrine\DBAL\Schema\SchemaException::indexAlreadyExists() at C:\www\mbarulin.sozd.srvdev.ru\vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\Table.php:510 > Doctrine\DBAL\Schema\Table->_addIndex() at C:\www\mbarulin.sozd.srvdev.ru\vendor\doctrine\dbal\lib\Doctrine\DBAL\Schema\Table.php:562
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5130