Adding Fluent Create-builders for Column, Table, Index and ForeignKey.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Model
|
||||
{
|
||||
public class ConstraintDefinition
|
||||
{
|
||||
public ConstraintDefinition(ConstraintType type)
|
||||
{
|
||||
constraintType = type;
|
||||
}
|
||||
|
||||
private ConstraintType constraintType;
|
||||
public bool IsPrimaryKeyConstraint { get { return ConstraintType.PrimaryKey == constraintType; } }
|
||||
public bool IsUniqueConstraint { get { return ConstraintType.Unique == constraintType; } }
|
||||
|
||||
public string SchemaName { get; set; }
|
||||
public string ConstraintName { get; set; }
|
||||
public string TableName { get; set; }
|
||||
public ICollection<string> Columns = new HashSet<string>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Model
|
||||
{
|
||||
public enum ConstraintType
|
||||
{
|
||||
PrimaryKey,
|
||||
Unique
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Model
|
||||
{
|
||||
public enum Direction
|
||||
{
|
||||
Ascending = 0,
|
||||
Descending = 1
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,4 @@
|
||||
public virtual string Name { get; set; }
|
||||
public virtual Direction Direction { get; set; }
|
||||
}
|
||||
|
||||
public enum Direction
|
||||
{
|
||||
Ascending = 0,
|
||||
Descending = 1
|
||||
}
|
||||
}
|
||||
@@ -17,14 +17,14 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter
|
||||
{
|
||||
var expression = new AlterTableExpression { TableName = tableName };
|
||||
//_context.Expressions.Add(expression);
|
||||
return new AlterTableSyntaxBuilder(expression, _context);
|
||||
return new AlterTableBuilder(expression, _context);
|
||||
}
|
||||
|
||||
public IAlterColumnSyntax Column(string columnName)
|
||||
{
|
||||
var expression = new AlterColumnExpression { Column = { Name = columnName } };
|
||||
//_context.Expressions.Add(expression);
|
||||
return new AlterColumnSyntaxBuilder(expression, _context);
|
||||
return new AlterColumnBuilder(expression, _context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,13 +5,14 @@ using Umbraco.Core.Persistence.Migrations.Syntax.Expressions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Column
|
||||
{
|
||||
public class AlterColumnSyntaxBuilder : ExpressionBuilder<AlterColumnExpression, IAlterColumnOptionSyntax>,
|
||||
public class AlterColumnBuilder : ExpressionBuilder<AlterColumnExpression, IAlterColumnOptionSyntax>,
|
||||
IAlterColumnSyntax,
|
||||
IAlterColumnTypeSyntax,
|
||||
IAlterColumnOptionForeignKeyCascadeSyntax
|
||||
{
|
||||
private readonly IMigrationContext _context;
|
||||
|
||||
public AlterColumnSyntaxBuilder(AlterColumnExpression expression, IMigrationContext context)
|
||||
public AlterColumnBuilder(AlterColumnExpression expression, IMigrationContext context)
|
||||
: base(expression)
|
||||
{
|
||||
_context = context;
|
||||
@@ -24,6 +25,30 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Column
|
||||
return Expression.Column;
|
||||
}
|
||||
|
||||
public IAlterColumnTypeSyntax OnTable(string name)
|
||||
{
|
||||
Expression.TableName = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IAlterColumnOptionSyntax WithDefault(SystemMethods method)
|
||||
{
|
||||
var dc = new AlterDefaultConstraintExpression
|
||||
{
|
||||
TableName = Expression.TableName,
|
||||
SchemaName = Expression.SchemaName,
|
||||
ColumnName = Expression.Column.Name,
|
||||
DefaultValue = method
|
||||
};
|
||||
|
||||
_context.Expressions.Add(dc);
|
||||
|
||||
Expression.Column.DefaultValue = method;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public IAlterColumnOptionSyntax WithDefaultValue(object value)
|
||||
{
|
||||
var dc = new AlterDefaultConstraintExpression
|
||||
@@ -2,6 +2,6 @@
|
||||
{
|
||||
public interface IAlterColumnSyntax : IFluentSyntax
|
||||
{
|
||||
|
||||
IAlterColumnTypeSyntax OnTable(string name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Column
|
||||
{
|
||||
public interface IAlterColumnTypeSyntax : IColumnTypeSyntax<IAlterColumnOptionSyntax>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,13 +5,13 @@ using Umbraco.Core.Persistence.Migrations.Syntax.Expressions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Table
|
||||
{
|
||||
public class AlterTableSyntaxBuilder : ExpressionBuilder<AlterTableExpression, IAlterTableColumnOptionSyntax>,
|
||||
IAlterTableColumnSyntax,
|
||||
public class AlterTableBuilder : ExpressionBuilder<AlterTableExpression, IAlterTableColumnOptionSyntax>,
|
||||
IAlterTableColumnTypeSyntax,
|
||||
IAlterTableColumnOptionForeignKeyCascadeSyntax
|
||||
{
|
||||
private readonly IMigrationContext _context;
|
||||
|
||||
public AlterTableSyntaxBuilder(AlterTableExpression expression, IMigrationContext context)
|
||||
public AlterTableBuilder(AlterTableExpression expression, IMigrationContext context)
|
||||
: base(expression)
|
||||
{
|
||||
_context = context;
|
||||
@@ -26,6 +26,12 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Table
|
||||
return CurrentColumn;
|
||||
}
|
||||
|
||||
public IAlterTableColumnOptionSyntax WithDefault(SystemMethods method)
|
||||
{
|
||||
CurrentColumn.DefaultValue = method;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IAlterTableColumnOptionSyntax WithDefaultValue(object value)
|
||||
{
|
||||
if (CurrentColumn.ModificationType == ModificationType.Alter)
|
||||
@@ -211,7 +217,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Table
|
||||
return this;
|
||||
}
|
||||
|
||||
public IAlterTableColumnSyntax AddColumn(string name)
|
||||
public IAlterTableColumnTypeSyntax AddColumn(string name)
|
||||
{
|
||||
var column = new ColumnDefinition { Name = name, ModificationType = ModificationType.Create };
|
||||
var createColumn = new CreateColumnExpression
|
||||
@@ -227,7 +233,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Table
|
||||
return this;
|
||||
}
|
||||
|
||||
public IAlterTableColumnSyntax AlterColumn(string name)
|
||||
public IAlterTableColumnTypeSyntax AlterColumn(string name)
|
||||
{
|
||||
var column = new ColumnDefinition { Name = name, ModificationType = ModificationType.Alter };
|
||||
var alterColumn = new AlterColumnExpression
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Table
|
||||
{
|
||||
public interface IAlterTableColumnSyntax : IColumnTypeSyntax<IAlterTableColumnOptionSyntax>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Alter.Table
|
||||
{
|
||||
public interface IAlterTableColumnTypeSyntax : IColumnTypeSyntax<IAlterTableColumnOptionSyntax>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
public interface IAlterTableSyntax : IFluentSyntax
|
||||
{
|
||||
IAlterTableColumnSyntax AddColumn(string name);
|
||||
IAlterTableColumnSyntax AlterColumn(string name);
|
||||
IAlterTableColumnTypeSyntax AddColumn(string name);
|
||||
IAlterTableColumnTypeSyntax AlterColumn(string name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
using System.Data;
|
||||
using Umbraco.Core.Persistence.Migrations.Model;
|
||||
using Umbraco.Core.Persistence.Migrations.Syntax.Expressions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Column
|
||||
{
|
||||
public class CreateColumnBuilder : ExpressionBuilder<CreateColumnExpression, ICreateColumnOptionSyntax>,
|
||||
ICreateColumnOnTableSyntax,
|
||||
ICreateColumnTypeSyntax,
|
||||
ICreateColumnOptionForeignKeyCascadeSyntax
|
||||
{
|
||||
private readonly IMigrationContext _context;
|
||||
|
||||
public CreateColumnBuilder(CreateColumnExpression expression, IMigrationContext context)
|
||||
: base(expression)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public ForeignKeyDefinition CurrentForeignKey { get; set; }
|
||||
|
||||
public override ColumnDefinition GetColumnForType()
|
||||
{
|
||||
return Expression.Column;
|
||||
}
|
||||
|
||||
public ICreateColumnTypeSyntax OnTable(string name)
|
||||
{
|
||||
Expression.TableName = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax WithDefault(SystemMethods method)
|
||||
{
|
||||
Expression.Column.DefaultValue = method;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax WithDefaultValue(object value)
|
||||
{
|
||||
Expression.Column.DefaultValue = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax Identity()
|
||||
{
|
||||
return Indexed(null);
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax Indexed()
|
||||
{
|
||||
return Indexed(null);
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax Indexed(string indexName)
|
||||
{
|
||||
Expression.Column.IsIndexed = true;
|
||||
|
||||
var index = new CreateIndexExpression
|
||||
{
|
||||
Index = new IndexDefinition
|
||||
{
|
||||
Name = indexName,
|
||||
SchemaName = Expression.SchemaName,
|
||||
TableName = Expression.TableName
|
||||
}
|
||||
};
|
||||
|
||||
index.Index.Columns.Add(new IndexColumnDefinition
|
||||
{
|
||||
Name = Expression.Column.Name
|
||||
});
|
||||
|
||||
_context.Expressions.Add(index);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax PrimaryKey()
|
||||
{
|
||||
Expression.Column.IsPrimaryKey = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax PrimaryKey(string primaryKeyName)
|
||||
{
|
||||
Expression.Column.IsPrimaryKey = true;
|
||||
Expression.Column.PrimaryKeyName = primaryKeyName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax Nullable()
|
||||
{
|
||||
Expression.Column.IsNullable = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax NotNullable()
|
||||
{
|
||||
Expression.Column.IsNullable = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax Unique()
|
||||
{
|
||||
return Unique(null);
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax Unique(string indexName)
|
||||
{
|
||||
Expression.Column.IsUnique = true;
|
||||
|
||||
var index = new CreateIndexExpression
|
||||
{
|
||||
Index = new IndexDefinition
|
||||
{
|
||||
Name = indexName,
|
||||
SchemaName = Expression.SchemaName,
|
||||
TableName = Expression.TableName,
|
||||
IsUnique = true
|
||||
}
|
||||
};
|
||||
|
||||
index.Index.Columns.Add(new IndexColumnDefinition
|
||||
{
|
||||
Name = Expression.Column.Name
|
||||
});
|
||||
|
||||
_context.Expressions.Add(index);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionForeignKeyCascadeSyntax ForeignKey(string primaryTableName, string primaryColumnName)
|
||||
{
|
||||
return ForeignKey(null, null, primaryTableName, primaryColumnName);
|
||||
}
|
||||
|
||||
public ICreateColumnOptionForeignKeyCascadeSyntax ForeignKey(string foreignKeyName, string primaryTableName,
|
||||
string primaryColumnName)
|
||||
{
|
||||
return ForeignKey(foreignKeyName, null, primaryTableName, primaryColumnName);
|
||||
}
|
||||
|
||||
public ICreateColumnOptionForeignKeyCascadeSyntax ForeignKey(string foreignKeyName, string primaryTableSchema,
|
||||
string primaryTableName, string primaryColumnName)
|
||||
{
|
||||
Expression.Column.IsForeignKey = true;
|
||||
|
||||
var fk = new CreateForeignKeyExpression
|
||||
{
|
||||
ForeignKey = new ForeignKeyDefinition
|
||||
{
|
||||
Name = foreignKeyName,
|
||||
PrimaryTable = primaryTableName,
|
||||
PrimaryTableSchema = primaryTableSchema,
|
||||
ForeignTable = Expression.TableName,
|
||||
ForeignTableSchema = Expression.SchemaName
|
||||
}
|
||||
};
|
||||
|
||||
fk.ForeignKey.PrimaryColumns.Add(primaryColumnName);
|
||||
fk.ForeignKey.ForeignColumns.Add(Expression.Column.Name);
|
||||
|
||||
_context.Expressions.Add(fk);
|
||||
CurrentForeignKey = fk.ForeignKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionForeignKeyCascadeSyntax ForeignKey()
|
||||
{
|
||||
Expression.Column.IsForeignKey = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionForeignKeyCascadeSyntax ReferencedBy(string foreignTableName, string foreignColumnName)
|
||||
{
|
||||
return ReferencedBy(null, null, foreignTableName, foreignColumnName);
|
||||
}
|
||||
|
||||
public ICreateColumnOptionForeignKeyCascadeSyntax ReferencedBy(string foreignKeyName, string foreignTableName,
|
||||
string foreignColumnName)
|
||||
{
|
||||
return ReferencedBy(foreignKeyName, null, foreignTableName, foreignColumnName);
|
||||
}
|
||||
|
||||
public ICreateColumnOptionForeignKeyCascadeSyntax ReferencedBy(string foreignKeyName, string foreignTableSchema,
|
||||
string foreignTableName, string foreignColumnName)
|
||||
{
|
||||
var fk = new CreateForeignKeyExpression
|
||||
{
|
||||
ForeignKey = new ForeignKeyDefinition
|
||||
{
|
||||
Name = foreignKeyName,
|
||||
PrimaryTable = Expression.TableName,
|
||||
PrimaryTableSchema = Expression.SchemaName,
|
||||
ForeignTable = foreignTableName,
|
||||
ForeignTableSchema = foreignTableSchema
|
||||
}
|
||||
};
|
||||
|
||||
fk.ForeignKey.PrimaryColumns.Add(Expression.Column.Name);
|
||||
fk.ForeignKey.ForeignColumns.Add(foreignColumnName);
|
||||
|
||||
_context.Expressions.Add(fk);
|
||||
CurrentForeignKey = fk.ForeignKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionForeignKeyCascadeSyntax OnDelete(Rule rule)
|
||||
{
|
||||
CurrentForeignKey.OnDelete = rule;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionForeignKeyCascadeSyntax OnUpdate(Rule rule)
|
||||
{
|
||||
CurrentForeignKey.OnUpdate = rule;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateColumnOptionSyntax OnDeleteOrUpdate(Rule rule)
|
||||
{
|
||||
OnDelete(rule);
|
||||
OnUpdate(rule);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Column
|
||||
{
|
||||
public interface ICreateColumnOnTableSyntax : IColumnTypeSyntax<ICreateColumnOptionSyntax>
|
||||
{
|
||||
ICreateColumnTypeSyntax OnTable(string name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Column
|
||||
{
|
||||
public interface ICreateColumnOptionForeignKeyCascadeSyntax : ICreateColumnOptionSyntax,
|
||||
IForeignKeyCascadeSyntax<ICreateColumnOptionSyntax, ICreateColumnOptionForeignKeyCascadeSyntax>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Column
|
||||
{
|
||||
public interface ICreateColumnOptionSyntax : IColumnOptionSyntax<ICreateColumnOptionSyntax, ICreateColumnOptionForeignKeyCascadeSyntax>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Column
|
||||
{
|
||||
public interface ICreateColumnTypeSyntax : IColumnTypeSyntax<ICreateColumnOptionSyntax>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using Umbraco.Core.Persistence.Migrations.Syntax.Create.Expressions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Constraint
|
||||
{
|
||||
public class CreateConstraintBuilder : ExpressionBuilderBase<CreateConstraintExpression>,
|
||||
ICreateConstraintOnTableSyntax,
|
||||
ICreateConstraintColumnsSyntax
|
||||
{
|
||||
public CreateConstraintBuilder(CreateConstraintExpression expression) : base(expression)
|
||||
{
|
||||
}
|
||||
|
||||
public ICreateConstraintColumnsSyntax OnTable(string tableName)
|
||||
{
|
||||
Expression.Constraint.TableName = tableName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Column(string columnName)
|
||||
{
|
||||
Expression.Constraint.Columns.Add(columnName);
|
||||
}
|
||||
|
||||
public void Columns(string[] columnNames)
|
||||
{
|
||||
foreach (var columnName in columnNames)
|
||||
{
|
||||
Expression.Constraint.Columns.Add(columnName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Constraint
|
||||
{
|
||||
public interface ICreateConstraintColumnsSyntax : IFluentSyntax
|
||||
{
|
||||
void Column(string columnName);
|
||||
void Columns(string[] columnNames);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Constraint
|
||||
{
|
||||
public interface ICreateConstraintOnTableSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateConstraintColumnsSyntax OnTable(string tableName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Umbraco.Core.Persistence.Migrations.Model;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Expressions
|
||||
{
|
||||
public class CreateConstraintExpression : IMigrationExpression
|
||||
{
|
||||
public CreateConstraintExpression(ConstraintType type)
|
||||
{
|
||||
Constraint = new ConstraintDefinition(type);
|
||||
}
|
||||
|
||||
public ConstraintDefinition Constraint { get; private set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
//TODO replace with sql syntax provider
|
||||
return base.ToString() + Constraint.ConstraintName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Persistence.Migrations.Model;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Expressions
|
||||
{
|
||||
public class CreateTableExpression : IMigrationExpression
|
||||
{
|
||||
public CreateTableExpression()
|
||||
{
|
||||
Columns = new List<ColumnDefinition>();
|
||||
}
|
||||
|
||||
public virtual string SchemaName { get; set; }
|
||||
public virtual string TableName { get; set; }
|
||||
public virtual IList<ColumnDefinition> Columns { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
//TODO replace with sql syntax provider
|
||||
return base.ToString() + TableName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System.Data;
|
||||
using Umbraco.Core.Persistence.Migrations.Syntax.Expressions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.ForeignKey
|
||||
{
|
||||
public class CreateForeignKeyBuilder : ExpressionBuilderBase<CreateForeignKeyExpression>,
|
||||
ICreateForeignKeyFromTableSyntax,
|
||||
ICreateForeignKeyForeignColumnSyntax,
|
||||
ICreateForeignKeyToTableSyntax,
|
||||
ICreateForeignKeyPrimaryColumnSyntax,
|
||||
ICreateForeignKeyCascadeSyntax
|
||||
{
|
||||
public CreateForeignKeyBuilder(CreateForeignKeyExpression expression) : base(expression)
|
||||
{
|
||||
}
|
||||
|
||||
public ICreateForeignKeyForeignColumnSyntax FromTable(string table)
|
||||
{
|
||||
Expression.ForeignKey.ForeignTable = table;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateForeignKeyToTableSyntax ForeignColumn(string column)
|
||||
{
|
||||
Expression.ForeignKey.ForeignColumns.Add(column);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateForeignKeyToTableSyntax ForeignColumns(params string[] columns)
|
||||
{
|
||||
foreach (var column in columns)
|
||||
Expression.ForeignKey.ForeignColumns.Add(column);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateForeignKeyForeignColumnSyntax ToTable(string table)
|
||||
{
|
||||
Expression.ForeignKey.PrimaryTable = table;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateForeignKeyCascadeSyntax PrimaryColumn(string column)
|
||||
{
|
||||
Expression.ForeignKey.PrimaryColumns.Add(column);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateForeignKeyCascadeSyntax PrimaryColumns(params string[] columns)
|
||||
{
|
||||
foreach (var column in columns)
|
||||
Expression.ForeignKey.PrimaryColumns.Add(column);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateForeignKeyCascadeSyntax OnDelete(Rule rule)
|
||||
{
|
||||
Expression.ForeignKey.OnDelete = rule;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateForeignKeyCascadeSyntax OnUpdate(Rule rule)
|
||||
{
|
||||
Expression.ForeignKey.OnUpdate = rule;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void OnDeleteOrUpdate(Rule rule)
|
||||
{
|
||||
Expression.ForeignKey.OnDelete = rule;
|
||||
Expression.ForeignKey.OnUpdate = rule;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Data;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.ForeignKey
|
||||
{
|
||||
public interface ICreateForeignKeyCascadeSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateForeignKeyCascadeSyntax OnDelete(Rule rule);
|
||||
ICreateForeignKeyCascadeSyntax OnUpdate(Rule rule);
|
||||
void OnDeleteOrUpdate(Rule rule);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.ForeignKey
|
||||
{
|
||||
public interface ICreateForeignKeyForeignColumnSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateForeignKeyToTableSyntax ForeignColumn(string column);
|
||||
ICreateForeignKeyToTableSyntax ForeignColumns(params string[] columns);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.ForeignKey
|
||||
{
|
||||
public interface ICreateForeignKeyFromTableSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateForeignKeyForeignColumnSyntax FromTable(string table);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.ForeignKey
|
||||
{
|
||||
public interface ICreateForeignKeyPrimaryColumnSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateForeignKeyCascadeSyntax PrimaryColumn(string column);
|
||||
ICreateForeignKeyCascadeSyntax PrimaryColumns(params string[] columns);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.ForeignKey
|
||||
{
|
||||
public interface ICreateForeignKeyToTableSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateForeignKeyForeignColumnSyntax ToTable(string table);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,22 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create
|
||||
{
|
||||
public interface ICreateBuilder
|
||||
public interface ICreateBuilder : IFluentSyntax
|
||||
{
|
||||
|
||||
/*
|
||||
ICreateTableWithColumnOrSchemaSyntax Table(string tableName);
|
||||
ICreateColumnOnTableSyntax Column(string columnName);
|
||||
*
|
||||
ICreateForeignKeyFromTableSyntax ForeignKey();
|
||||
ICreateForeignKeyFromTableSyntax ForeignKey(string foreignKeyName);
|
||||
*
|
||||
ICreateIndexForTableSyntax Index();
|
||||
ICreateIndexForTableSyntax Index(string indexName);
|
||||
*
|
||||
ICreateConstraintOnTableSyntax PrimaryKey();
|
||||
ICreateConstraintOnTableSyntax PrimaryKey(string primaryKeyName);
|
||||
*
|
||||
ICreateConstraintOnTableSyntax UniqueConstraint();
|
||||
ICreateConstraintOnTableSyntax UniqueConstraint(string constraintName);
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using Umbraco.Core.Persistence.Migrations.Model;
|
||||
using Umbraco.Core.Persistence.Migrations.Syntax.Expressions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Index
|
||||
{
|
||||
public class CreateIndexBuilder : ExpressionBuilderBase<CreateIndexExpression>,
|
||||
ICreateIndexForTableSyntax,
|
||||
ICreateIndexOnColumnSyntax,
|
||||
ICreateIndexColumnOptionsSyntax,
|
||||
ICreateIndexOptionsSyntax
|
||||
{
|
||||
public CreateIndexBuilder(CreateIndexExpression expression) : base(expression)
|
||||
{
|
||||
}
|
||||
|
||||
public IndexColumnDefinition CurrentColumn { get; set; }
|
||||
|
||||
public ICreateIndexOnColumnSyntax OnTable(string tableName)
|
||||
{
|
||||
Expression.Index.TableName = tableName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateIndexColumnOptionsSyntax OnColumn(string columnName)
|
||||
{
|
||||
CurrentColumn = new IndexColumnDefinition { Name = columnName };
|
||||
Expression.Index.Columns.Add(CurrentColumn);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateIndexOptionsSyntax WithOptions()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateIndexOnColumnSyntax Ascending()
|
||||
{
|
||||
CurrentColumn.Direction = Direction.Ascending;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateIndexOnColumnSyntax Descending()
|
||||
{
|
||||
CurrentColumn.Direction = Direction.Descending;
|
||||
return this;
|
||||
}
|
||||
|
||||
ICreateIndexOnColumnSyntax ICreateIndexColumnOptionsSyntax.Unique()
|
||||
{
|
||||
Expression.Index.IsUnique = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateIndexOnColumnSyntax NonClustered()
|
||||
{
|
||||
Expression.Index.IsClustered = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateIndexOnColumnSyntax Clustered()
|
||||
{
|
||||
Expression.Index.IsClustered = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
ICreateIndexOnColumnSyntax ICreateIndexOptionsSyntax.Unique()
|
||||
{
|
||||
Expression.Index.IsUnique = true;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Index
|
||||
{
|
||||
public interface ICreateIndexColumnOptionsSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateIndexOnColumnSyntax Ascending();
|
||||
ICreateIndexOnColumnSyntax Descending();
|
||||
ICreateIndexOnColumnSyntax Unique();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Index
|
||||
{
|
||||
public interface ICreateIndexForTableSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateIndexOnColumnSyntax OnTable(string tableName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Index
|
||||
{
|
||||
public interface ICreateIndexOnColumnSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateIndexColumnOptionsSyntax OnColumn(string columnName);
|
||||
ICreateIndexOptionsSyntax WithOptions();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Index
|
||||
{
|
||||
public interface ICreateIndexOptionsSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateIndexOnColumnSyntax Unique();
|
||||
ICreateIndexOnColumnSyntax NonClustered();
|
||||
ICreateIndexOnColumnSyntax Clustered();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
using System.Data;
|
||||
using Umbraco.Core.Persistence.Migrations.Model;
|
||||
using Umbraco.Core.Persistence.Migrations.Syntax.Create.Expressions;
|
||||
using Umbraco.Core.Persistence.Migrations.Syntax.Expressions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Table
|
||||
{
|
||||
public class CreateTableBuilder : ExpressionBuilder<CreateTableExpression, ICreateTableColumnOptionSyntax>,
|
||||
ICreateTableWithColumnSyntax,
|
||||
ICreateTableColumnAsTypeSyntax,
|
||||
ICreateTableColumnOptionForeignKeyCascadeSyntax
|
||||
{
|
||||
private readonly IMigrationContext _context;
|
||||
|
||||
public CreateTableBuilder(CreateTableExpression expression, IMigrationContext context)
|
||||
: base(expression)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public ColumnDefinition CurrentColumn { get; set; }
|
||||
|
||||
public ForeignKeyDefinition CurrentForeignKey { get; set; }
|
||||
|
||||
public override ColumnDefinition GetColumnForType()
|
||||
{
|
||||
return CurrentColumn;
|
||||
}
|
||||
|
||||
public ICreateTableColumnAsTypeSyntax WithColumn(string name)
|
||||
{
|
||||
var column = new ColumnDefinition { Name = name, TableName = Expression.TableName, ModificationType = ModificationType.Create };
|
||||
Expression.Columns.Add(column);
|
||||
CurrentColumn = column;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax WithDefault(SystemMethods method)
|
||||
{
|
||||
CurrentColumn.DefaultValue = method;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax WithDefaultValue(object value)
|
||||
{
|
||||
CurrentColumn.DefaultValue = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax Identity()
|
||||
{
|
||||
CurrentColumn.IsIdentity = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax Indexed()
|
||||
{
|
||||
return Indexed(null);
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax Indexed(string indexName)
|
||||
{
|
||||
CurrentColumn.IsIndexed = true;
|
||||
|
||||
var index = new CreateIndexExpression
|
||||
{
|
||||
Index = new IndexDefinition
|
||||
{
|
||||
Name = indexName,
|
||||
SchemaName = Expression.SchemaName,
|
||||
TableName = Expression.TableName
|
||||
}
|
||||
};
|
||||
|
||||
index.Index.Columns.Add(new IndexColumnDefinition
|
||||
{
|
||||
Name = CurrentColumn.Name
|
||||
});
|
||||
|
||||
_context.Expressions.Add(index);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax PrimaryKey()
|
||||
{
|
||||
CurrentColumn.IsPrimaryKey = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax PrimaryKey(string primaryKeyName)
|
||||
{
|
||||
CurrentColumn.IsPrimaryKey = true;
|
||||
CurrentColumn.PrimaryKeyName = primaryKeyName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax Nullable()
|
||||
{
|
||||
CurrentColumn.IsNullable = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax NotNullable()
|
||||
{
|
||||
CurrentColumn.IsNullable = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax Unique()
|
||||
{
|
||||
return Unique(null);
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax Unique(string indexName)
|
||||
{
|
||||
CurrentColumn.IsUnique = true;
|
||||
|
||||
var index = new CreateIndexExpression
|
||||
{
|
||||
Index = new IndexDefinition
|
||||
{
|
||||
Name = indexName,
|
||||
SchemaName = Expression.SchemaName,
|
||||
TableName = Expression.TableName,
|
||||
IsUnique = true
|
||||
}
|
||||
};
|
||||
|
||||
index.Index.Columns.Add(new IndexColumnDefinition
|
||||
{
|
||||
Name = CurrentColumn.Name
|
||||
});
|
||||
|
||||
_context.Expressions.Add(index);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionForeignKeyCascadeSyntax ForeignKey(string primaryTableName, string primaryColumnName)
|
||||
{
|
||||
return ForeignKey(null, null, primaryTableName, primaryColumnName);
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionForeignKeyCascadeSyntax ForeignKey(string foreignKeyName, string primaryTableName,
|
||||
string primaryColumnName)
|
||||
{
|
||||
return ForeignKey(foreignKeyName, null, primaryTableName, primaryColumnName);
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionForeignKeyCascadeSyntax ForeignKey(string foreignKeyName, string primaryTableSchema,
|
||||
string primaryTableName, string primaryColumnName)
|
||||
{
|
||||
CurrentColumn.IsForeignKey = true;
|
||||
|
||||
var fk = new CreateForeignKeyExpression
|
||||
{
|
||||
ForeignKey = new ForeignKeyDefinition
|
||||
{
|
||||
Name = foreignKeyName,
|
||||
PrimaryTable = primaryTableName,
|
||||
PrimaryTableSchema = primaryTableSchema,
|
||||
ForeignTable = Expression.TableName,
|
||||
ForeignTableSchema = Expression.SchemaName
|
||||
}
|
||||
};
|
||||
|
||||
fk.ForeignKey.PrimaryColumns.Add(primaryColumnName);
|
||||
fk.ForeignKey.ForeignColumns.Add(CurrentColumn.Name);
|
||||
|
||||
_context.Expressions.Add(fk);
|
||||
CurrentForeignKey = fk.ForeignKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionForeignKeyCascadeSyntax ForeignKey()
|
||||
{
|
||||
CurrentColumn.IsForeignKey = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionForeignKeyCascadeSyntax ReferencedBy(string foreignTableName, string foreignColumnName)
|
||||
{
|
||||
return ReferencedBy(null, null, foreignTableName, foreignColumnName);
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionForeignKeyCascadeSyntax ReferencedBy(string foreignKeyName, string foreignTableName,
|
||||
string foreignColumnName)
|
||||
{
|
||||
return ReferencedBy(foreignKeyName, null, foreignTableName, foreignColumnName);
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionForeignKeyCascadeSyntax ReferencedBy(string foreignKeyName, string foreignTableSchema,
|
||||
string foreignTableName, string foreignColumnName)
|
||||
{
|
||||
var fk = new CreateForeignKeyExpression
|
||||
{
|
||||
ForeignKey = new ForeignKeyDefinition
|
||||
{
|
||||
Name = foreignKeyName,
|
||||
PrimaryTable = Expression.TableName,
|
||||
PrimaryTableSchema = Expression.SchemaName,
|
||||
ForeignTable = foreignTableName,
|
||||
ForeignTableSchema = foreignTableSchema
|
||||
}
|
||||
};
|
||||
|
||||
fk.ForeignKey.PrimaryColumns.Add(CurrentColumn.Name);
|
||||
fk.ForeignKey.ForeignColumns.Add(foreignColumnName);
|
||||
|
||||
_context.Expressions.Add(fk);
|
||||
CurrentForeignKey = fk.ForeignKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionForeignKeyCascadeSyntax OnDelete(Rule rule)
|
||||
{
|
||||
CurrentForeignKey.OnDelete = rule;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionForeignKeyCascadeSyntax OnUpdate(Rule rule)
|
||||
{
|
||||
CurrentForeignKey.OnUpdate = rule;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICreateTableColumnOptionSyntax OnDeleteOrUpdate(Rule rule)
|
||||
{
|
||||
OnDelete(rule);
|
||||
OnUpdate(rule);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Table
|
||||
{
|
||||
public interface ICreateTableColumnAsTypeSyntax : IColumnTypeSyntax<ICreateTableColumnOptionSyntax>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Table
|
||||
{
|
||||
public interface ICreateTableColumnOptionForeignKeyCascadeSyntax :
|
||||
ICreateTableColumnOptionSyntax,
|
||||
IForeignKeyCascadeSyntax<ICreateTableColumnOptionSyntax, ICreateTableColumnOptionForeignKeyCascadeSyntax>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Table
|
||||
{
|
||||
public interface ICreateTableColumnOptionSyntax :
|
||||
IColumnOptionSyntax<ICreateTableColumnOptionSyntax, ICreateTableColumnOptionForeignKeyCascadeSyntax>,
|
||||
ICreateTableWithColumnSyntax
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax.Create.Table
|
||||
{
|
||||
public interface ICreateTableWithColumnSyntax : IFluentSyntax
|
||||
{
|
||||
ICreateTableColumnAsTypeSyntax WithColumn(string name);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax
|
||||
using Umbraco.Core.Persistence.Migrations.Model;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Syntax
|
||||
{
|
||||
public interface IColumnOptionSyntax<TNext, TNextFk> : IFluentSyntax
|
||||
where TNext : IFluentSyntax
|
||||
where TNextFk : IFluentSyntax
|
||||
{
|
||||
TNext WithDefault(SystemMethods method);
|
||||
TNext WithDefaultValue(object value);
|
||||
TNext Identity();
|
||||
TNext Indexed();
|
||||
|
||||
@@ -226,6 +226,9 @@
|
||||
<Compile Include="Persistence\Migrations\MigrationContext.cs" />
|
||||
<Compile Include="Persistence\Migrations\MigrationRunner.cs" />
|
||||
<Compile Include="Persistence\Migrations\Model\ColumnDefinition.cs" />
|
||||
<Compile Include="Persistence\Migrations\Model\ConstraintDefinition.cs" />
|
||||
<Compile Include="Persistence\Migrations\Model\ConstraintType.cs" />
|
||||
<Compile Include="Persistence\Migrations\Model\Direction.cs" />
|
||||
<Compile Include="Persistence\Migrations\Model\ModificationType.cs" />
|
||||
<Compile Include="Persistence\Migrations\Model\ForeignKeyDefinition.cs" />
|
||||
<Compile Include="Persistence\Migrations\Model\IndexColumnDefinition.cs" />
|
||||
@@ -234,20 +237,47 @@
|
||||
<Compile Include="Persistence\Migrations\Model\TableDefinition.cs" />
|
||||
<Compile Include="Persistence\Migrations\PluginManagerExtension.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\AlterSyntaxBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Column\AlterColumnSyntaxBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Column\AlterColumnBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Column\IAlterColumnOptionForeignKeyCascadeSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Column\IAlterColumnOptionSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Column\IAlterColumnSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Column\IAlterColumnTypeSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Expressions\AlterColumnExpression.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Expressions\AlterTableExpression.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\IAlterSyntaxBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Table\AlterTableSyntaxBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Table\AlterTableBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Table\IAlterTableColumnOptionForeignKeyCascadeSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Table\IAlterTableColumnOptionSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Table\IAlterTableColumnSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Table\IAlterTableColumnTypeSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Alter\Table\IAlterTableSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Column\CreateColumnBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Column\ICreateColumnOnTableSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Column\ICreateColumnOptionForeignKeyCascadeSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Column\ICreateColumnOptionSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Column\ICreateColumnTypeSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Constraint\CreateConstraintBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Constraint\ICreateConstraintColumnsSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Constraint\ICreateConstraintOnTableSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\CreateBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Expressions\CreateConstraintExpression.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Expressions\CreateTableExpression.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\ForeignKey\CreateForeignKeyBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\ForeignKey\ICreateForeignKeyCascadeSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\ForeignKey\ICreateForeignKeyForeignColumnSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\ForeignKey\ICreateForeignKeyFromTableSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\ForeignKey\ICreateForeignKeyPrimaryColumnSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\ForeignKey\ICreateForeignKeyToTableSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\ICreateBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Index\CreateIndexBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Index\ICreateIndexColumnOptionsSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Index\ICreateIndexForTableSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Index\ICreateIndexOnColumnSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Index\ICreateIndexOptionsSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Table\CreateTableBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Table\ICreateTableColumnAsTypeSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Table\ICreateTableColumnOptionForeignKeyCascadeSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Table\ICreateTableColumnOptionSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Create\Table\ICreateTableWithColumnSyntax.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Delete\DeleteBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\Delete\IDeleteBuilder.cs" />
|
||||
<Compile Include="Persistence\Migrations\Syntax\ExpressionBuilder.cs" />
|
||||
|
||||
Reference in New Issue
Block a user