Stored procedures/DB schema in source control

后端 未结 21 973
孤街浪徒
孤街浪徒 2020-12-04 05:56

Do you guys keep track of stored procedures and database schema in your source control system of choice?

When you make a change (add a table, update an stored proc,

21条回答
  •  心在旅途
    2020-12-04 06:32

    Stored procedures get 1 file per sp with the standard if exist drop/create statements at the top. Views and functions also get their own files so they are easier to version and reuse.

    Schema is all 1 script to begin with then we'll do version changes.

    All of this is stored in a visual studio database project connected to TFS (@ work or VisualSVN Server @ home for personal stuff) with a folder structure as follows:
    - project
    -- functions
    -- schema
    -- stored procedures
    -- views

提交回复
热议问题