开发者

SQL utility scripts for schema modifications ( What would I call this? )

In a previous job we had an extensive SQLServer database that constantly had new fields being added years after release. We stored each table schema in a seperate plain text file that contained a SQL create or alter statement ( I can't remember which and that's bothering me ). When the need came for a new column, we would simply modify the SQL in the plain text file before compiling all the files into one master .Sql script. When the script was run it would either create the table if it didn't exist or alter the existing one to preserve the changes. Thus preventing any dataloss or the need to do any sort of importing/exporting.

My issue is that it was all done before I was there and I didn't get a good chance to read over the utilities and understand them. I'd like to recreate something like this for my own personal us, but I'm not quite sure how they were done. There were utilities for other things like stored procedures and views, but those would just create a stub if it did not exist and then all you had to do was call Alter in the plain text file. I am not sure how I can even begin looking this up since it didn't seem to come up when looking around 开发者_高级运维for "practices", "tips", or "patterns." Does anyone know of some resources for this or can shed some insight into getting these off the ground? Thanks!


If you google for "Continuous Database integration" you should find what you're looking for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜