Create Migration scripts from changesets?

gbronzergbronzer Posts: 9 Bronze 1
edited June 24, 2016 5:18AM in SQL Source Control
Under SQL Source Control 4, you could either create a migration script from uncommitted changes or from changesets (check-ins). We don't have Source Control tied to our production DB and we used that feature to generate deploy scripts because it created only those changes. The SQL Compare tool is way slower and wants to sync the DBs too much.

Are there any plans to re-enable the option to create migration scripts from a set of changes? Am I just missing the option somewhere in 5? This is a show stopper for us currently and I'll probably downgrade to 4 if it won't be added.

Thanks,
Greg

Comments

  • I'm afraid that feature isn't currently available all the new migrations solution, although we could add it in the future. There is a manual workaround though: https://documentation.red-gate.com/display/SOC5/Historical+migration+scripts. When deciding what features to implement next, we're guided by the feedback in Uservoice, so you could add a suggestion there to help us gauge its popularity.

    I'm surprised to hear that SQL Compare is too slow though - we use the same engine under the hood to generate the initial migration script. As long as you have the same filters, options, and objects selected in Compare, the performance of Compare should be equivalent to using SQL Source Control to generate the migration script.
    Development Lead
    Redgate Software
  • gbronzergbronzer Posts: 9 Bronze 1
    It's too slow because it requires us to compare against our live production database to create the changes from a few changesets. The migration tool allowed me to use an empty version of the db locally and generate the migration script so it was quite fast. I think I'll just downgrade for now.
  • If you use SQL Compare to compare directly between source control revisions (Source Control is one of the comparison sources in the main edit project dialog), you should be able to get exactly the same behaviour and performance as SQL Source Control has when generating the migration script.
    Development Lead
    Redgate Software
  • It sounds like we use Source Control in the same way as gbronzer. If I can't create migration scripts from committed changes then I either need to roll back to v4 or find some other way of working. We don't have SQL Compare.
  • Can I suggest that those of you who want to be able to create and commit migration scripts for previous commits vote for this Uservoice request. Also, if you could describe your use-case in more detail, either here or on that Uservoice request, that would help us to understand the need for it.

    Thanks,
    Mike
    Development Lead
    Redgate Software
  • Thanks Mike. I've upvoted that request and added a comment.
Sign In or Register to comment.