Constraints are dropped but not re-added.

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Constraints are dropped but not re-added.

Postby UKRoyster » Thu Jul 18, 2013 2:02 pm

SQL Compare 10.3.8

I am struggling with the script generation. After comparing two databases, I can see that the generated script drops all constraints (Foreign keys), but no where in the script are they re-added again.

Hence, if I execute the script and perform another compare, it sees that the constraints were dropped.

I am sure its a simple solution, just can't figure it out.
Thanks,
Roy.

Looking for great hotel deals? Try http://lovehoteldeals.co.uk/
UKRoyster
 
Posts: 6
Joined: Fri Jan 25, 2013 9:24 am

Postby andy.campbell.smith » Mon Jul 22, 2013 1:28 pm

This sounds like a bug we fixed in SQL Compare 10.4 - can I get you to upgrade and see if you're still hitting it? You can upgrade for free either by selecting Help->Check for Updates, or by downloading the installer here:

ftp://support.red-gate.com/patches/SQLC ... 4.8.87.exe

Let me know if that clears anything up!
Andy Campbell Smith

Red Gate Technical Support Engineer
andy.campbell.smith
 
Posts: 173
Joined: Thu Oct 20, 2011 11:19 am
Location: Red Gate Software

Postby UKRoyster » Mon Jul 22, 2013 2:01 pm

Bug is fixed. Thank you Andy.
Thanks,
Roy.

Looking for great hotel deals? Try http://lovehoteldeals.co.uk/
UKRoyster
 
Posts: 6
Joined: Fri Jan 25, 2013 9:24 am

Postby john.hunter » Tue Aug 13, 2013 11:31 am

I'm still having this problem with version 10.4.8.87 specifically dropping primary key and not adding it back.

I'm not sure why it is dropping the primary key in the first place.

EDIT: Ok I found that if I ignore indexes in my comparison the generated script drops Primary Keys but doesn't re-add them.
john.hunter
 
Posts: 5
Joined: Thu Jul 30, 2009 2:06 pm


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests