Added CreateIndex to Migrator
This commit is contained in:
parent
a1653022ad
commit
76d029361b
|
@ -13,7 +13,7 @@ namespace Migrator.Framework
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get this provider or a NoOp provider if you are not running in the context of 'provider'.
|
/// Get this provider or a NoOp provider if you are not running in the context of 'provider'.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ITransformationProvider this[string provider] { get;}
|
ITransformationProvider this[string provider] { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The list of Migrations currently applied to the database.
|
/// The list of Migrations currently applied to the database.
|
||||||
|
@ -194,6 +194,15 @@ namespace Migrator.Framework
|
||||||
/// <param name="constraint"></param>
|
/// <param name="constraint"></param>
|
||||||
void GenerateForeignKey(string foreignTable, string primaryTable, ForeignKeyConstraint constraint);
|
void GenerateForeignKey(string foreignTable, string primaryTable, ForeignKeyConstraint constraint);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add an Index to a table
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The name of the index to add.</param>
|
||||||
|
/// <param name="table">The name of the table that will get the index.</param>
|
||||||
|
/// <param name="unique">If the index will be unique</param>
|
||||||
|
/// <param name="columns">The name of the column or columns that are in the index.</param>
|
||||||
|
void AddIndex(string name, string table, bool unique, params string[] columns);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a primary key to a table
|
/// Add a primary key to a table
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -376,6 +385,13 @@ namespace Migrator.Framework
|
||||||
/// <param name="name">The name of the constraint to remove</param>
|
/// <param name="name">The name of the constraint to remove</param>
|
||||||
void RemoveConstraint(string table, string name);
|
void RemoveConstraint(string table, string name);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remove an existing index
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="table">The table that contains the index.</param>
|
||||||
|
/// <param name="name">The name of the index to remove</param>
|
||||||
|
void RemoveIndex(string table, string name);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Remove an existing table
|
/// Remove an existing table
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using Migrator.Framework;
|
using Migrator.Framework;
|
||||||
using ForeignKeyConstraint=Migrator.Framework.ForeignKeyConstraint;
|
using ForeignKeyConstraint=Migrator.Framework.ForeignKeyConstraint;
|
||||||
|
@ -54,6 +55,11 @@ namespace Migrator.Providers
|
||||||
// No Op
|
// No Op
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveIndex(string table, string name)
|
||||||
|
{
|
||||||
|
// No Op
|
||||||
|
}
|
||||||
|
|
||||||
public void AddTable(string name, params Column[] columns)
|
public void AddTable(string name, params Column[] columns)
|
||||||
{
|
{
|
||||||
// No Op
|
// No Op
|
||||||
|
@ -129,6 +135,16 @@ namespace Migrator.Providers
|
||||||
// No Op
|
// No Op
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AddIndex(string name, string table, params string[] columns)
|
||||||
|
{
|
||||||
|
//No Op
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddIndex(string name, string table, bool unique, params string[] columns)
|
||||||
|
{
|
||||||
|
//No Op
|
||||||
|
}
|
||||||
|
|
||||||
public void AddPrimaryKey(string name, string table, params string[] columns)
|
public void AddPrimaryKey(string name, string table, params string[] columns)
|
||||||
{
|
{
|
||||||
// No Op
|
// No Op
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue