How can we help you today? How can we help you today?
way0utwest
Try a -Force here. I think that will help, but not in a place to test, and everyone in the UK is gone for the weekend. Can you check the version of SCA on your build server? / comments
Try a -Force here. I think that will help, but not in a place to test, and everyone in the UK is gone for the weekend. Can you check the version of SCA on your build server?
0 votes
You can also use a repo for the snippets folder. I have mine as a git repo, so that if I change things, I can commit and store in VCS, pulling down on other machines. / comments
You can also use a repo for the snippets folder. I have mine as a git repo, so that if I change things, I can commit and store in VCS, pulling down on other machines.
0 votes
Here's a relatively short answer. I have a longer one in draft and there also is this short description: https://www.red-gate.com/library/redgates-database-lifecycle-management-approaches-a-comparison First, in either method, branching can be problematic. You want those feature branches for db changes to be as short as possible if there is the chance of conflict. We dont' want anyone building on bad work, so this is a tradeoff, but I'd suggest as soon as you're confident of a change, merge right away and re-pull a branch if you have other things to do. Now, SQL Source Control (SOC). I like this for simplicity and additive, easy changes. Meaning no data manipulation, no renames, merges, splits. Those are a hole in the state/model/comparison approach. You've seen this with SQL Compare, which powers this process. If you're here, this works well. The migration scripts in SOC are flaky and since you can't control when they run. If you have schema changes depending on these, you can have issues. I would only use these as idempotent, run once scripts and then only if I can assume that order of execution doesn't matter. Right now there is no pre-post, but I'm hoping this will be added at some point. No news to share, but I really think this solves a lot of SOC issues, especially for the post scripts. For SQL Change Automation, SCA. This is a proven method that's been used for a long time, and it works well, but the branch thing applies more, because merges across branches are a pain. Chronology matters in migration scripts, so whenever you try to merge these, you need to not merge the code, but sort out the ordering and potentially rename scripts to control execution. At any scale of team members and changes, this is a pain. It's less if developers keep informed of other changes, say at a daily standup, and potentially rename/number their scripts early on. You may still need to idempotent architect the scripts if you get "fixes" in production that might slip by your process. If not, then anything going to prod needs merging into child branches quickly, potentially necessitating rewriting code or renaming files. The other issue I have with SCA is that I need to watch the things happening in Dev. If I add a column to a table that has 1,000,000,000 rows in prod and move data, then do some stuff, then delete that column. I DO NOT want that flowing to prod. With merges, I might need to make sure I eliminate that script, which also means I'm trying to unwind something that happened in development manually. That can be problematic with numbers of scripts. The big thing here is to watch the "undo" stuff that developers might do and ensure that they don't necessarily just add the undo migration, but really think about wiping out the earlier scripts. Depending on your flow, this creates complexity. I wish that a bunch of migration scripts gave me a good summary of what's coming. You can get this in the release testing if you flow your changes through the SCA automation process, which may help you summarize the changes and potentially go back to unwind and clean up some scripts that make and undo a change. Final word from me. I think migrations/SCA is superior to lowering risk and covering lots of scenarios. It's not perfect and there is a higher burden on the developer to capture and manage the change scripts, as opposed to more the DBA, Ops side of DevOps with SOC. However, it covers my scenarios of any change needed better. I would slightly change this if post scripts appear in SOC, but I still prefer SCA. / comments
Here's a relatively short answer. I have a longer one in draft and there also is this short description: https://www.red-gate.com/library/redgates-database-lifecycle-management-approaches-a-compari...
0 votes