How can we help you today? How can we help you today?
way0utwest
I think gitflow is unnecessarily complex, and it's problematic for databases, but if you use it, that's OK. If you look at gitflow, you aren't putting your changes from the local machine to the remote db, are you?  You are sending your changes to the VCS and the SCA automation process should push them to another machine. However, that doesn't matter. You push/pull your changes from VCS, which is what other developers do. First, you need strong communication if developers might touch the same object. That can be something like a Slack channel, or some other mechanism for a developer to just say "I've changed x". This important, otherwise you'll end up with hard merges. You could even make a quick "I'm doing this" in your standup. Your gitflow should have feature branches, correct? This means you have master---------o---o---------------------o dev  --------0/----o/---------o--------o fb1             \---o---\-o----/ fb2        \----o/ In this case, master is at the top, where I release. Dev is below. Let's have Steve work fb1 and Andy work fb2. Andy gets dev copied and then commits. He is happy with his commit (o) and pushes up to dev. This is the second o. This gets merged to master. Steve later gets a branch from dev, fb1, and works and commits. Change is good. He then pulls from dev, which at this point, should include the change from Andy. Steve needs to merge this in his branch, which might be simple, might be hard. If there is communication, either there is no conflict or there is the need to resolve changes. Steve then commits again and pushes/merges changes to dev later. The key here is that you need to have short lived branches for the db, since this is a shared area. If you need to work, make your branch and push changes that you know work, immediately. If you're not sure or this takes time, then stage changes and pull from dev again to get anything merged in. Then try applying your changes again. The really issue here is that the longer branches live, the more likely there are conflicts. Imagine that you have multiple C#/Java developers working on the same method. If they each make a quick change and merge, the other likely gets the changes. If they wait weeks, merging might be really hard. The same thing with databases. What I'd suggest if that you plan out changes, maybe get an idea, and save them after you've experimented a bit. This might be an hour or a week. Then rebuild the db branch again, essentially a new feature branch, and make your changes. If they're good, immediately commit and merge back to dev. / comments
I think gitflow is unnecessarily complex, and it's problematic for databases, but if you use it, that's OK.If you look at gitflow, you aren't putting your changes from the local machine to the remo...
0 votes
Where are you excluding users? Is this a filter in SCA/SQL Source Control? Or are you adding the switch to the DLM cmdlets to ignore users and roles? / comments
Where are you excluding users? Is this a filter in SCA/SQL Source Control? Or are you adding the switch to the DLM cmdlets to ignore users and roles?
0 votes
OK, I have these answers: ========= This is due to the Control Flow options they have set and the example they use in the different cases.  So they have "Place BEGIN keyword on new line" true "Indent BEGIN END keywords" false "Indent contents of statements" true "Collapse statements shorter than <100> characters" true In the first example ```IF @Country = 'USA' BEGIN SET @FormatCode = 1; END; ELSE BEGIN SET @FormatCode = 2; END;``` It's collapsing the statements because they are shorter than 100 characters - this overrides the Begin on new line and the indent contents of statements. It does something odd though if you make "Place BEGIN keyword on new line" false but leave the others - it then indents the second SET statement which I think is probably a bug. In their last example the content of the BEGIN/END is more than 100 chars and so it doesn't collapse it. This is all independent of how far the IF is indented as that will be set to the correct indention if the collapse is not set.  So if you add another BEGIN / END around the above query and turn off collapse, it will indent the content of the overall BEGIN as well as the internal BEGINs to the correct place ======== I've played with the style. I think the removing the collapse item fixes most of this, but the SETs are still wrong if things are not included inside some other structure. Is this just a script you have or is it part of a larger set of work? / comments
OK, I have these answers:=========This is due to the Control Flow options they have set and the example they use in the different cases.  So they have"Place BEGIN keyword on new line" true"Indent B...
0 votes
Hmm, with your style, I get this: IF @Country = 'USA' BEGIN<br>SET @FormatCode = 1;<br>END;<br>ELSE BEGIN<br>SET @FormatCode = 2;<br>END;Not sure why you get the weird formatting. I'll have to bump this. / comments
Hmm, with your style, I get this: IF @Country = 'USA' BEGIN<br>SET @FormatCode = 1;<br>END;<br>ELSE BEGIN<br>SET @FormatCode = 2;<br>END;Not sure why you get the weird formatting. I'll have to bump...
0 votes