src/EntityFramework/Migrations/DbMigration.cs
/// <summary>
///     Adds an operation to create an index on a single column.
/// </summary>
/// <param name="table"> The name of the table to create the index on. Schema name is optional, if no schema is specified then dbo is assumed. </param>
/// <param name="column"> The name of the column to create the index on. </param>
/// <param name="unique"> A value indicating if this is a unique index. If no value is supplied a non-unique index will be created. </param>
/// <param name="name"> The name to use for the index in the database. If no value is supplied a unique name will be generated. </param>
/// <param name="clustered"> A value indicating whether or not this is a clustered index. </param>
/// <param name="anonymousArguments"> Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'. </param>
Adds an operation to create an index on a single column.
Adds an operation to create an index on a single column .
[SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
        protected internal void CreateIndex(
            string table,
            string column,
            bool unique = false,
            string name = null,
            bool clustered = false,
            object anonymousArguments = null)
        {
            Check.NotEmpty(table, "table");
            Check.NotEmpty(column, "column");
            CreateIndex(table, new[] { column }, unique, name, clustered, anonymousArguments);
        }
[ SuppressMessage ( " " , " " ) ] protected internal void CreateIndex ( string table , string column , bool unique = false , string name = null , bool clustered = false , object anonymousArguments = null ) { Check . NotEmpty ( table , " " ) ; Check . NotEmpty ( column , " " ) ; CreateIndex ( table , new [ ] { column } , unique , name , clustered , anonymousArguments ) ; }
Adds an operation to create an index on a single column.
Adds an operation to create an index on a single column .
table
string
The name of the table to create the index on. Schema name is optional, if no schema is specified then dbo is assumed.
The name of the table to create the index on . Schema name is optional if no schema is specified then dbo is assumed .
column
string
The name of the column to create the index on.
The name of the column to create the index on .
unique
bool
A value indicating if this is a unique index. If no value is supplied a non-unique index will be created.
A value indicating if this is a unique index . If no value is supplied a non - unique index will be created .
name
string
The name to use for the index in the database. If no value is supplied a unique name will be generated.
The name to use for the index in the database . If no value is supplied a unique name will be generated .
clustered
bool
A value indicating whether or not this is a clustered index.
A value indicating whether or not this is a clustered index .
anonymousArguments
object
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Additional arguments that may be processed by providers . Use anonymous type syntax to specify arguments e . g . ' new { SampleArgument = " MyValue " } ' .