SQL syntax for creating unique index does not create a unique index #3319
I'm using migrations in a project to create custom database tables. I wanted to create a unique index using the sql syntax builder. But it doesn't create a unique index.
Steps to reproduce
Create a migration that creates a table with a unique index using this syntax
The table is not created with a unique index. But a normal (nonclustered) index.
When I look in the logs (loglevel needs to be DEBUG) I also see a non unique index being created
The last statement should be
As far as I can see the core doesn't use this method. But the database has unique indexes. These are probably created in the initial database setup which uses the schemahelper to create tables from POCO's
I see in another project the devs scripted the unique index in a migration by using Exexute.Sql() method.
Will have a stab it this week. I also think it always creates the index as non clustered.