How to add Stored Procedures to Version Control

后端 未结 6 459
礼貌的吻别
礼貌的吻别 2021-01-31 17:53

Our team just experienced for the first time the hassle of not having version control for our DB. How can we add stored procedures at the very least to version control? The cur

6条回答
  •  梦如初夏
    2021-01-31 18:24

    I think it's good to have each stored procedure scripted to a separate .sql file and then just commit those files into source control. Any time a sproc is changed, update the creation script - this gives you full version history on a sproc by sproc basis.

    There are SQL Server source control tools that hook into SSMS, but I think they are just scripting the db objects and committing those scripts. Red Gate looks to be due to releasing such a tool this year for example.

提交回复
热议问题