Getting "does not belong to differences collection" error

ZackZack Posts: 1 New member
I have a temporal table named Address with an AddressHistory table as its history. It's one of over a hundred such tables, but this one is throwing an error trying to deploy to my UAT server.

"Object Table: [dbo].[AddressHIstory] does not belong to differences collection"

And it's right. "Address" shows up in the differences, but the difference is in the script that creates "AddressHistory". I don't know why that's in the script for "Address" in the first place. Please help.

I'm running 13.1.8.5525 Professional
Tagged:

Answers

  • Hi Zack,

    It sounds like you've been affected by a recent change in behaviour: SQL Compare now scripts out the history table alongside its parent temporal table, so that indexes on history table columns can be stored. You might have hit a bug in the way we migrate from the scripts folder without history tables to the folder with them. This was fixed in 13.1.9 but it's probably better if you upgrade to the latest version.
    Software Developer
    Redgate Software
  • PDXManPDXMan Posts: 3 Bronze 1
    I am having a similar issue.  However, the object it is referencing isn't even in the database I am comparing.  It is not in any of the objects returned.  It is in another database.  It is the full text catalog object I use in another database.  

    How can I clear this "history"?
  • That sounds like an unrelated issue to me - the "history table" Zack was referring to was created using the Temporal Tables feature introduced in SQL Server 2016.  Your issue sounds like some sort of cross-database dependency that SQL Compare is failing to handle, with a similar error message.  Could you contact support@red-gate.com, ideally with a scripts folder or snapshot, so they can reproduce the issue?
    Software Developer
    Redgate Software
Sign In or Register to comment.