What are the challenges you face when working across database platforms? Take the survey
Options

SemVer migration folder confusion

I utilize the semver option to group scripts into migration folders. We recently branched for the first time since implementing the ReadyRoll project structure, so I needed to create a new migration folder. I added the new version, but none of the scripts being imported are actually going into that folder. Instead, they are all being importing into our first version folder. How do I tell ReadyRoll to properly use the newest migration folder when importing? I've looked everywhere to see if there's a setting, but I can't seem to find one. Thanks!
Tagged:

Comments

  • Options
    I'm sorry to hear that. ReadyRoll should be inserting new migration scripts into the folder that has the highest version number as defined by the semver.org spec. Would you mind sharing the structure of your migration folder and build output to find out what might be going wrong (feel free to PM me if you'd prefer not to post it here)?
    Daniel Nolan
    Product Manager
    Redgate Software
  • Options
    berkshireseanyberkshireseany Posts: 10 Bronze 1
    Good morning Dan,

    Sorry for the delayed response, been a little busy and had honestly forgotten about this post. It turns out this might have been an issue with TFS. I checked in our projects after branching code from 3.9.1 to 4.0.0, and you can see in the attached screenshots that I added the new 4.0.0 folder to the ReadyRoll projects. It appeared that the issue was ReadyRoll was not recognizing folders that did not yet have any scripts in them. It turns out, when I checked the projects into TFS, the folder wasn't physically created on the other dev's machines, even though the project shows the folder as existing. So if the folder doesn't physically exist when pathing to it, then clearly ReadyRoll isn't going to know to insert it there. I'm not sure why this quirk happened on check-in, but I'll have to make sure it doesn't happen again in the future. Thanks for following up with me.

    Thanks,

    Sean
  • Options
    Hi Sean,

    Thanks very much for detailing the cause of the problem. I've been able to reproduce this myself, using Git, so it seems that it's not actually specific to TFS.

    I've raised this internally so it can be resolved (issue #556). In the meantime, may need to add a "dummy" migration to any new semver folders (e.g. just containing a PRINT statement) to avoid the missing folder behaviour from causing an issue in ReadyRoll again.

    Best Regards,

    Daniel
    Daniel Nolan
    Product Manager
    Redgate Software
  • Options
    berkshireseanyberkshireseany Posts: 10 Bronze 1
    Good Morning Dan,

    Thanks for looking into this and raising the bug. We're good on our side for now, we know it's a possible issue, so we are either going to manually create the folders, or manually force the empty folders to get checked in to resolve the issue.

    Thanks,

    Sean
  • Options
    That's great, Sean and thanks for letting me know your workaround. I'll post here again when I have an update on the fix
    Daniel Nolan
    Product Manager
    Redgate Software
Sign In or Register to comment.