Hacker News new | ask | show | jobs
by yoz-y 3470 days ago
From what I gathered one of the biggest problems of stored procedures is that they do not play well at all with source control and associated tooling such as code review.
2 comments

I just tried to commit a stored procedure to git and it seemed to work.

I then asked a colleague to review it. This also worked.

Ok. I did not know that. As I said this is what I have gathered from what I have read around as a common complaint. Out of curiosity, what is the testing-deployment cycle of stored procedures in source control? How do you assure yourself that the database uses a procedure coming from a specific commit?
How do you assure yourself that your non-database code uses code coming from a specific commit?

In general, you have a deployment procedure that overwrites all the old code with all-new code, and from there on out you trust, right? Why not use the same approach?

Rubbish you can check in your sprocs into a source control system along with the Database schema I never had any problems at BT when we did this.

And why can you not code review your sprocs?