News for hackers. Stuff that matters.
Re:What ORMs Have Taught Me: Just Learn SQL (2014) by Philip-J-Fry on Wednesday October 21, 2020 @03:22AM (#24845516)
The argument against it I usually see is "you can't version control SQL!"

Where I work we have a custom system which manages releasing immutable SQL snapshots between environments and they get merged to master once in prod. The only thing needed is a process, and then version control is easy.

Re:What ORMs Have Taught Me: Just Learn SQL (2014) by rakoo on Wednesday October 21, 2020 @04:13AM (#24845769)
Editing stored procedures and deploying them on a database is the same as editing code deploying it on a server. There is no difficulty in versioning it
Re:What ORMs Have Taught Me: Just Learn SQL (2014) by xupybd on Wednesday October 21, 2020 @03:31AM (#24845560)
Yeah you can just use a migration system and store your functions in text files checked into the version control. Nothing but the migrations are allowed in staging and production so everyone is forced to use it.
Re:What ORMs Have Taught Me: Just Learn SQL (2014) by joeyjojo on Wednesday October 21, 2020 @07:13AM (#24846628)
As a front-end dev, I've been interested in learning about such a process but don't know where to look. What kind of tooling would you use to manage your migrations in a CI environment?
Re:What ORMs Have Taught Me: Just Learn SQL (2014) by smada on Wednesday October 21, 2020 @08:13AM (#24846997)
ive used liquibase in the past (not affiliated) with great results https://www.liquibase.org
Re:What ORMs Have Taught Me: Just Learn SQL (2014) by funcDropShadow on Wednesday October 21, 2020 @08:42AM (#24847228)
Flyway or Liquibase.
Re:What ORMs Have Taught Me: Just Learn SQL (2014) by JamesSwift on Wednesday October 21, 2020 @10:15AM (#24848068)
I'm not sure about other DBs, but SQL Server has (really good) tools for this (DACPACs). As an added bonus you can then use tSQLt to unit test the SQL.
Re:What ORMs Have Taught Me: Just Learn SQL (2014) by grep_name on Wednesday October 21, 2020 @08:29AM (#24847103)
> you can't version control SQL

Aren't stored procedures part of the database schema? Which can be version controlled?