Started working with FluentMigrator today and unfortunately, I am pretty sure I know the answer to my question, but is there any nice way to get FluentMigrator to create a nonclustered primary key when using a Sql-Server provider?
I was hoping for something similar to. (which obviously doesn’t exist)..
Create.Table("User")
.WithColumn("Id").AsInt32().Identity().PrimaryKey().WithOptions().NonClustered()
The best option I have found thus far is using Execute with a SQL block which is far less than ideal… any better options?
Unfortunately, the only course of action was to use:
Basically, FluentMigrator has become the tool to run the SQL scripts, but the fluent interface is being ignored. Basically, it is a script runner more than anything in my project at this point. Could probably roll our own, but the migration component works as expected. The Fluent interface is just too constraining, and you typically need DB specific features when defining tables etc to get best performance (being database agnostic is not really a good thing).