Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public virtual void Execute()
else
{
stmtBuilder.Append(line);
stmtBuilder.Append(Environment.NewLine);
Comment thread
AndyButland marked this conversation as resolved.
Outdated
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public MigrationPlanExecutor(
/// <para>Each migration in the plan, may or may not run in a scope depending on the type of plan.</para>
/// <para>A plan can complete partially, the changes of each completed migration will be saved.</para>
/// </remarks>
[Obsolete("This will return an ExecutedMigrationPlan in V13")]
public ExecutedMigrationPlan ExecutePlan(MigrationPlan plan, string fromState)
{
plan.Validate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
using Umbraco.Cms.Tests.Common.TestHelpers;
using Umbraco.Cms.Tests.Common.Testing;
using Umbraco.Cms.Tests.Integration.Testing;
using Umbraco.Extensions;

namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.SyntaxProvider;

Expand Down Expand Up @@ -137,7 +136,7 @@ public void CreateIndexBuilder_SqlServer_NonClustered_CreatesNonClusteredIndex()
.Do();

Assert.AreEqual(1, db.Operations.Count);
Assert.AreEqual("CREATE NONCLUSTERED INDEX [IX_A] ON [TheTable] ([A])", db.Operations[0].Sql);
Assert.AreEqual("CREATE NONCLUSTERED INDEX [IX_A] ON [TheTable] ([A])", db.Operations[0].Sql.Trim());
}

[Test]
Expand All @@ -152,7 +151,7 @@ public void CreateIndexBuilder_SqlServer_Unique_CreatesUniqueNonClusteredIndex()
.Do();

Assert.AreEqual(1, db.Operations.Count);
Assert.AreEqual("CREATE UNIQUE NONCLUSTERED INDEX [IX_A] ON [TheTable] ([A])", db.Operations[0].Sql);
Assert.AreEqual("CREATE UNIQUE NONCLUSTERED INDEX [IX_A] ON [TheTable] ([A])", db.Operations[0].Sql.Trim());
}

[Test]
Expand All @@ -167,7 +166,7 @@ public void CreateIndexBuilder_SqlServer_Unique_CreatesUniqueNonClusteredIndex_M
.Do();

Assert.AreEqual(1, db.Operations.Count);
Assert.AreEqual("CREATE UNIQUE NONCLUSTERED INDEX [IX_AB] ON [TheTable] ([A],[B])", db.Operations[0].Sql);
Assert.AreEqual("CREATE UNIQUE NONCLUSTERED INDEX [IX_AB] ON [TheTable] ([A],[B])", db.Operations[0].Sql.Trim());
}

[Test]
Expand All @@ -182,7 +181,7 @@ public void CreateIndexBuilder_SqlServer_Clustered_CreatesClusteredIndex()
.Do();

Assert.AreEqual(1, db.Operations.Count);
Assert.AreEqual("CREATE CLUSTERED INDEX [IX_A] ON [TheTable] ([A])", db.Operations[0].Sql);
Assert.AreEqual("CREATE CLUSTERED INDEX [IX_A] ON [TheTable] ([A])", db.Operations[0].Sql.Trim());
}

private static IndexDefinition CreateIndexDefinition() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void Drop_Foreign_Key()
// Assert
Assert.That(database.Operations.Count, Is.EqualTo(1));
Assert.That(
database.Operations[0].Sql,
database.Operations[0].Sql.Trim(),
Is.EqualTo("ALTER TABLE [umbracoUser2app] DROP CONSTRAINT [FK_umbracoUser2app_umbracoUser_id]"));
}

Expand All @@ -68,7 +68,7 @@ public void CreateColumn()

Assert.That(database.Operations.Count, Is.EqualTo(1));
Assert.That(
database.Operations[0].Sql,
database.Operations[0].Sql.Trim(),
Is.EqualTo("ALTER TABLE [bar] ADD [foo] UniqueIdentifier NOT NULL"));
}

Expand Down Expand Up @@ -97,7 +97,7 @@ public void AlterColumn()

Assert.That(database.Operations.Count, Is.EqualTo(1));
Assert.That(
database.Operations[0].Sql,
database.Operations[0].Sql.Trim(),
Is.EqualTo("ALTER TABLE [bar] ALTER COLUMN [foo] UniqueIdentifier NOT NULL"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void CanExecute()

Assert.AreEqual("VERSION.33", state);
Assert.AreEqual(1, database.Operations.Count);
Assert.AreEqual("DROP TABLE [umbracoRedirectUrl]", database.Operations[0].Sql);
Assert.AreEqual("DROP TABLE [umbracoRedirectUrl]", database.Operations[0].Sql.Trim());
}

[Test]
Expand Down