Red Gate forums :: View topic - What should happen in this case?
Return to RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

What should happen in this case?

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message

Joined: 30 Dec 2011
Posts: 19

PostPosted: Sat Feb 11, 2012 11:23 pm    Post subject: What should happen in this case? Reply with quote

During the course of development we have applied a foreign key constraint to an existing table and saved to source control. A week later we determined that the foreign key constraint should not be there so we removed it and again saved to source control. When we perform a compare against source control despite the fact that compare indicates that the tables are equivalent, the deployment script that is created still attempts to create the foreign key constraint. Everything has been checked into source control so it is unclear where it is even getting the information to create the foreign key, unless it is somehow following history. Even if that were the case there is no subsequent attempt to remove the constraints, which would leave the database in an incorrect state at the end of deployment.

We are using the latest version of SQL compare 10, against SQL Server 2005 databases and using Vault 5.0 for source control.
Back to top
View user's profile Send private message
Brian Donahue

Joined: 23 Aug 2004
Posts: 6677

PostPosted: Tue Feb 14, 2012 12:49 pm    Post subject: Reply with quote


Without more information it's impossible to work out what happened there. But if I were trying to figure it out I'd fist check the local copy of the source controlled folder and see if the constraint is still in the .sql file for that table.

If so, Vault must have some sort of problem. Do you use the Vault client to get the scripts or do you use SQL Compare's get latest from source control? Or do you tell SQL Compare to use a scripts folder rather than getting the latest from source control? If you manually get latest, do you then have the correct script?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group