News for hackers. Stuff that matters.
Re:Treating SQL like code by MikeTV on Thursday January 13, 2022 @11:33AM (#29922728)
My experience also. This is particularly bad in the SQL Server space, since Microsoft essentially dropped source control integration in SQL Server Management Studio 2016 and later (there's an official workaround[0], but it's not well received).

Most likely they're happy to offload version control to add-ins. There are a few, but most of them are way out of budget for small businesses or small IT departments. Which means version control usually doesn't happen.

This has been such a problem for me with clients that I started a side project[1] to try to help fill the gap. If anything it's shown me that the problem is more widespread than I originally thought.

[0] https://cloudblogs.microsoft.com/sqlserver/2016/11/21/source...

[1] https://www.versionsql.com/

Re:Treating SQL like code by fatnoah on Thursday January 13, 2022 @12:00PM (#29923195)
In the past, I used the SQL project feature of Visual Studio to great success to manage the DB. Everything except data up/down migrations was well supported, and it enabled us to keep our SQL in source control. I never even knew there was direct integration with SQL server.
Re:Treating SQL like code by zip1234 on Thursday January 13, 2022 @12:04PM (#29923272)
SQL Projects are still nice and still work in the lastest Visual Studio. You can sync the DDL from a current DB to the project and vice versa.
Re:Treating SQL like code by fatnoah on Thursday January 13, 2022 @02:49PM (#29925836)
That's good to hear. When I started that job, the DB upgrade was a massive, manually curated SQL file that would be run for every upgrade and contained every change from the beginning of time. You can imagine how well that worked. I blew peoples' minds with the idea of "building" a database package