Red Gate forums :: View topic - Use migrations in get latest
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

Use migrations in get latest

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



Joined: 23 Feb 2012
Posts: 2

PostPosted: Thu Feb 23, 2012 5:17 pm    Post subject: Use migrations in get latest Reply with quote

We have a development database per developer. When updating these databases (get latest) the migrations we created and stored in SVN are not being executed. How can I use the migrations in our development area?

Gerben
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Mon Feb 27, 2012 6:41 pm    Post subject: Reply with quote

Apparently, migrations scripts are meant to run through Source Control too. All we can think of is that the migrations scripts didn't actually commit to begin with.
Back to top
View user's profile Send private message
GerbenD



Joined: 23 Feb 2012
Posts: 2

PostPosted: Thu Mar 01, 2012 4:22 pm    Post subject: Reply with quote

Currently there is a conversation between redgate en me about the problem. It seems the creation of a developmentbranche in svn and/or disconnecting and connecting to that branche have some impact. In a simple testsituation I saw the migration being used by GetLatest.

When we have a solution I will post an update.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Thu Mar 01, 2012 7:02 pm    Post subject: Reply with quote

Hello,

I've got it reproduced and I'll try to find the cause tomorrow and let everyone know.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6649

PostPosted: Fri Mar 02, 2012 11:34 am    Post subject: Reply with quote

I think it's because the current revision is actually stored in the database... say your migration script is set to run when updating rev 6 to rev 7 and your database is currently at rev 9, then the script will not run.

If you do:
Code:
SELECT objtype, objname, name, value
FROM fn_listextendedproperty(default, default, default, default, default, default, default);


Then this will tell you the current revision number. If you had linked to one repository that was at v9, for instance, and then linked to another repository at a lower rev, the changes don't seem to get pushed. I think this is the reason why the docs say to create a new database when you're branching.
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