Red Gate forums :: View topic - Migration script not detected
Return to www.red-gate.com RSS Feed Available

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

Migration script not detected

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



Joined: 15 Oct 2010
Posts: 37

PostPosted: Wed Feb 06, 2013 6:37 pm    Post subject: Migration script not detected Reply with quote

I set up my first migration script in SQL Source Control, but need some help determining why SQL Compare won't detect the script. Thank you in advance for any advice you can provide.

SQL Compare version: 10.3.1.140
SQL Source Control version: 3.1.3.26
SQL Server 2008 R2
TFS 2010
Example I'm following: Worked Example

+ I have checked in the migration script to source control (TFS).
+ The only difference between what I did and the example is that I created the migration script against "Specific Changes", not "Uncommitted Changes", which means I could not select a specific table like they did in the example. Is that the problem?
+ The script is set to transition the DB from revision 10392 to 10459.
+ I have verified that the Target DB in SQL Compare is on revision 10392 using the "SQLSourceControl Database Revision" extended property on the target DB.
+ In the example above, SQL Compare shows a "Revision: 64" under the "Database" drop-down when setting up the source and target. Mine does not show any "Revision" label at all. What does that mean?
Back to top
View user's profile Send private message
AdamY



Joined: 15 Oct 2010
Posts: 37

PostPosted: Thu Feb 07, 2013 1:08 am    Post subject: Update Reply with quote

I started over so I could tie the migration script to "Specific Changes" (the tables, functions, data, and sprocs). But now SQL Source Control won't let me check in the items - I get this error: TF10141: No files checked in: resolve the conflicts and try again.
So until I can figure out that problem, I can't continue with my work-around attempt.
Back to top
View user's profile Send private message
AdamY



Joined: 15 Oct 2010
Posts: 37

PostPosted: Thu Feb 07, 2013 6:57 pm    Post subject: Work-around, possible bug. Reply with quote

Well, it took me quite a bit of work to get everything back to a clean state (fix the TF10141 error) but I did. I was then able to link my migration script to "Uncommitted Changes" so I could tie it to 3 specific objects. After I did that, then SQL Compare detected the migration script as desired. So the root issue appears to be:
In order for SQL Compare to detect the migration script, it seems that the script must be linked to specific object(s) via "Uncomitted Changes", not a pre-committed change (i.e. "Specific Changes").

I don't remember seeing that in any of the examples or tutorials and it makes me wonder what the purpose is for creating a migration script against "Specific Changes" if the compare process won't see it. Maybe this is a bug? Or more likely I just don't fully understand the process yet.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6582

PostPosted: Mon Feb 11, 2013 4:47 pm    Post subject: Reply with quote

Correct me if I'm wrong, but it seems that what happened is this:

  • You linked a database to source control
  • You tried to compare the database (with some other database) using SQL Compare and you did not get the migration scripts in as part of the migration
  • After resolving the conflict and committing changes, you got the desired behavior

This sounds like what it should do, based on that description. SQL Source Control is going to need to get the revision numbers back from the source control system (TFS) in order to set up the migration scripts properly, and it can't do that until some changes were committed first.
Back to top
View user's profile Send private message
AdamY



Joined: 15 Oct 2010
Posts: 37

PostPosted: Mon Feb 11, 2013 5:11 pm    Post subject: Clarification Reply with quote

Brian,
That is incorrect. The problem was not related to a conflict or uncomitted changes. There were no conflicts and everything was checked in.

The problem was that when I created the migration script, I had to link it to "Uncommitted Changes" and tie it to specific objects and then commit them all at once. It would not work if I linked the migration script to "Specific Changes" (changes I had already checked in). So it seems SQL Compare will not recognize migration scripts that were linked to "Specific Changes" when they were created/committed.
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