Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Contrib][T4] Fix T4 template drop ForeignKey and Index

  • Loading branch information...
commit 571ef3125358131cbfb23664a409fcffc9eeb594 1 parent 9d836bc
@spaccabit authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/FluentMigrator.T4.Tests/IntialMigrationCode.tt
View
4 src/FluentMigrator.T4.Tests/IntialMigrationCode.tt
@@ -137,7 +137,7 @@ foreach(Table tbl in from t in tables where !t.Ignore select t)
{
if(!string.IsNullOrEmpty(fkey.Name)){
#>
- Delete.ForeignKey("<#=fkey.Name#>");
+ Delete.ForeignKey("<#=fkey.Name#>").OnTable("<#=tbl.Name#>")<#if (string.IsNullOrEmpty(tbl.Schema) == false ){#>.InSchema("<#=tbl.Schema#>")<#}#>;
<#
} else {
#>
@@ -154,7 +154,7 @@ foreach(Table tbl in from t in tables where !t.Ignore select t)
foreach(TableIndex idx in from i in tbl.Indexes select i)
{
#>
- Delete.Index("<#=idx.Name#>");
+ Delete.Index("<#=idx.Name#>").OnTable("<#=tbl.Name#>")<#if (string.IsNullOrEmpty(tbl.Schema) == false ){#>.InSchema("<#=tbl.Schema#>")<#}#>;
<#
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.