Drop/Create Git

Our App developers want to store objects in GIT as a drop/create. I am having issues using Red Gate Source control because red gates source control does not seem to be able to accommodate this. The top of every procedure/view... has this at the top.

If Exists(Select name From sys.objects Where name = 'XXXXX')
Drop Procedure XXXXX
 GO 
Create Procedure XXXXX


Any Advice?

Best Answer

  • Kendra_LittleKendra_Little Posts: 139 Gold 3
    Ah, I see.

    With SQL Source Control, the behavior is that it provides a standardized way of committing the files. But these are not designed to be deployment scripts -- for many object types (tables, etc), that wouldn't work at all. 

    There are a few options to configure deployments for SQL Source Control projects

    I don't know if your app development team holds licenses for SQL Compare or any other Redgate products, but if they do then there are options for them to create deployment scripts which include those re-runnable headers in them -- but this does require having SQL Compare or another tool to create those deployments.

    Happy to help give more detail on those if that would be helpful.

    Cheers,
    Kendra

Answers

Sign In or Register to comment.