4 ms·
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
by Philip-J-Fry 6y ago
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.
- xupybd 6y agoYeah 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.
- joeyjojo 6y agoAs 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?
- smada 6y agoive used liquibase in the past (not affiliated) with great results https://www.liquibase.org https://www.liquibase.org
- funcDropShadow 6y agoFlyway or Liquibase.
- rakoo 6y agoEditing 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
- grep_name 6y ago> you can't version control SQL Aren't stored procedures part of the database schema? Which can be version controlled?
- JamesSwift 6y agoI'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.