Red Gate forums :: View topic - 'Get latest' & migration script problems
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 3
SQL Source Control 3 forum

'Get latest' & migration script problems

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Author Message
SteveS



Joined: 01 Oct 2012
Posts: 2

PostPosted: Mon Oct 01, 2012 11:24 am    Post subject: 'Get latest' & migration script problems Reply with quote

Hi,

We're having trouble getting SSC to recognise that there are migration scripts to be included.

We have a database that is under source control with several migration scripts. The problem occurs when we want to start working on it on a fresh machine or database

Here are the steps that we are following:
1) Create a clean new database
2) Link it to existing db in source control
3) Click 'Get Latest'

The operation fails as it doesn't see there are migration scripts.

I think I know why this is happening...

As I understand, SSC relies on storing a version number in the extended properties of the database. It then uses that to determine whether the migration scripts are applicable or not.

However, for a fresh database that has just been linked to source control, these extended properties don't exist. As far as I see they only seem to get created once a successful commit or get is performed.

I've tried spoofing the extended properties, and using the database revision '1', but SSC doesn't seem to like this at all, throwing an exception
However repeating the step once it has failed seems to change something which then gets SSC to recognise that there are migration scripts to use. What it is, I don't know.

Shouldn't SSC be setting the extended properties when the database is first linked?
Otherwise I'm not sure how it knows which version it should be at.

Migration scripts are correctly picked up thereafter. The problem only occurs with a fresh database

Let me know if I'm doing something wrong, or you need more information

Cheers
Steve
Back to top
View user's profile Send private message
CraigEddy



Joined: 28 Sep 2012
Posts: 20

PostPosted: Tue Oct 02, 2012 3:52 am    Post subject: Reply with quote

This seems related to an issue I'm having with restoring from a database which is essentially a copy of the database I used to perform the initial commit, but which doesn't have any SQL Source Control information stored.

See http://www.red-gate.com/MessageBoard/viewtopic.php?t=15886
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