How can we help you today? How can we help you today?

Assembly Difference Not Appearing in Update Script

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());
}
}
medi_pv
0

Comments

1 comment

  • medi_pv
    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...
    medi_pv
    0

Add comment

Please sign in to leave a comment.