Multiple Developers Overwriting Others' Stored Procedure Commits

We are working on implementing the freeware version of Liquibase at our company and have a large issue we expect every body has, but can’t find the solution. First, a quick set up:

We have Liquibase set up with a folder for schema changes, such as Stored Procedures. Every new commit should be a new file with a unique name. Say we have say 5 different versions of the same stored procedure in source control (just iterating over time). Two different issues, same problem:

  • Scenario 1: Maybe a developer grabs version 4 instead of version 5 and creates a new change named 6. When applied (create or alter) it would drop 5 from the database. We do not have automated testing to the point that it is testing every little feature going out in our monthly release cadence. This could be damaging.

  • Scenario 2: two different developers working on the same stored procedure at the same time, at different locations. Both got latest. One submits the script first fixing bug A. A couple hours later, the second developer commits without rebasing to add feature B. The first developers changes are wiped away when the second submits.

Liquibase would not allow both to have the same file name (due to the hashing at deployment), how else might we be confident in knowing that everyone’s commits are actually making it to PROD through the pipeline without being overwritten?

Expanding one step further why this is a “liquibase” issue needing solving and not a simple process issue, we were using SSDT projects to manage schema. You can keep the same name and just at build time it would apply the most recent version in source control, so as long as you keep that clean you are fine.