Assembly Difference Not Appearing in Update Script

medi_pvmedi_pv Posts: 8
edited June 6, 2016 8:41AM in SQL Comparison SDK 11
I am using Database.CompareWith to get schema differences between two databases.

In the result differences, I see there is an 'assembly' that is different. I also confirm this in the SQL Compare UI.

However when I use Work.BuildFromDifferences and ExecutionBlock, I don't see the assembly update in the output SQL script.

Is there an option I need to enable? Suggestions? Sorry if I have missed something obvious, I'm new to the SDK...
static void CompareSchema(Database source, Database target)
{
Differences stagingVsProduction = source.CompareWith(target, Options.Default.Plus(Options.IgnoreConstraintNames));

foreach (Difference difference in stagingVsProduction)
{
Debug.Assert(difference.DatabaseObjectType != RedGate.SQLCompare.Engine.ObjectType.Assembly); I HIT THIS ASSERT
}

Work work = new Work();

work.BuildFromDifferences(stagingVsProduction, Options.Default/*.Plus(Options.IncludeDependencies)*/, true);

using (var block = work.ExecutionBlock)
{
File.WriteAllText("c:\temp\ct_schema.sql", block.GetString());
}
}

Comments

  • Nevermind, I figured out what I was doing wrong. I had a database object registered for both schema and data compares. Which seems to mess things up...
Sign In or Register to comment.