Apologies for this issue! There appears to be a problem in the latest version where SQL Source Control scripts may create unnamed foreign key constraints, but still try to reference the constraints by name. We are still looking into this and will post here when we have an update.
Is there an ETA as to when this will be fixed? We've now got a number of developers who are bypassing the RedGate tooling to avoid these types of errors.
I have the same issue... surely this has been resolved by now, some 6 months later? ANY migration script that does anything even simple now gives this useless error, and the logs do not even show the error as having occured!
This particular issue with the unnamed foreign key constraints (bug reference SOC-9553) was resolved as of version 6.3.2.8313. The stack trace for the error for this bug would show a call to IncrementalRegistrationSnapshotUpdater.UpdateLatestSnapshot.
If you're still running into a NullReferenceException with the latest version, it's likely from a different cause. If so, can you please open a separate forum post with more detail (or open a support ticket with support@red-gate.com if you have Support & Upgrades on your license)?
Thank you!
Jessica
Ramos | Product Support Engineer | Redgate Software
I ran in to the same problem. I am using SQL Source control 7.1.5. However, it only fails on a single database linked to a common SubVersion repository. Unlinking this database and relinking resolved the issue.
Answers
Thanks for your post.
Could you confirm which version of Source Control you're using please?
Kind regards
Richard Lynch.
Redgate Software
Workaround for me was: Unlinking the database, restart SSMS, and re-linking it. This ends up showing a bunch of conflicts.
SQL Server version 2017
SSMS Version 17.7
SQL Source Control version: 6.0.2.6908
Source control system: Git
Is there a solution to this issue?
Apologies for this issue! There appears to be a problem in the latest version where SQL Source Control scripts may create unnamed foreign key constraints, but still try to reference the constraints by name. We are still looking into this and will post here when we have an update.
In the meantime, you can downgrade to the previous release from here: ftp://support.red-gate.com/patches/sqlsourcecontrol/23May2018/SQLSourceControl_6.1.8.7584.exe
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
ANY migration script that does anything even simple now gives this useless error, and the logs do not even show the error as having occured!
So sorry for the delay in updating here!
If you're still running into a NullReferenceException with the latest version, it's likely from a different cause. If so, can you please open a separate forum post with more detail (or open a support ticket with support@red-gate.com if you have Support & Upgrades on your license)?
Thank you!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?