Use migrations in get latest

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

Comments

  • 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.
  • 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.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    I've got it reproduced and I'll try to find the cause tomorrow and let everyone know.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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:
    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.
Sign In or Register to comment.