From 8d81a5fc719b0e7f102c541a2fd7e9841244ece8 Mon Sep 17 00:00:00 2001 From: Olmo del Corral Cano Date: Tue, 11 Dec 2018 16:43:15 +0100 Subject: [PATCH] fix rename ForeignKey when changin Schema --- Signum.Engine/Engine/SchemaSynchronizer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Signum.Engine/Engine/SchemaSynchronizer.cs b/Signum.Engine/Engine/SchemaSynchronizer.cs index 69919f40e9..cc5bddd2be 100644 --- a/Signum.Engine/Engine/SchemaSynchronizer.cs +++ b/Signum.Engine/Engine/SchemaSynchronizer.cs @@ -349,7 +349,7 @@ from c in t.Columns.Values var name = SqlBuilder.ForeignKeyName(tab.Name.Name, colModel.Name); return SqlPreCommand.Combine(Spacing.Simple, - name != coldb.ForeignKey.Name.Name ? SqlBuilder.RenameForeignKey(coldb.ForeignKey.Name, name) : null, + name != coldb.ForeignKey.Name.Name ? SqlBuilder.RenameForeignKey(coldb.ForeignKey.Name.OnSchema(tab.Name.Schema), name) : null, (coldb.ForeignKey.IsDisabled || coldb.ForeignKey.IsNotTrusted) && !replacements.SchemaOnly ? SqlBuilder.EnableForeignKey(tab.Name, name) : null); }) );