3

We have a production database (SQL Server 2019) with existing code (tables, procedures, functions, synonyms) that was deployed without a source repository. Our client wants to introduce a new schema with new code, but keep all the old code and data intact.

We plan to deploy the database changes via Azure DevOps pipeline - SQL Database Project in VS (new approach for all new changes and projects).

How do we create and deploy a database project solution that contains only the new schema and its related code, without including or modifying the existing database objects?

We want to avoid touching the old schema/code to prevent any risk or downtime. The new schema should be deployed independently, coexisting with the old schema and code.

What tools handle such partial database deployments?

How do we manage this in source control and CI/CD pipelines, especially considering the old code is not in a repo?

philipxy
8021 gold badge8 silver badges18 bronze badges
asked Jun 9 at 18:28

1 Answer 1

4

We do this in our environment now and we don't have any issues. We don't use Dev Ops pipelines, but we do have all of our stuff in Visual Studio projects with source control backing them.

We have one project with the dbo schema objects, and this one lives and dies with the application code.

We have another project (actually two), with different schemas in them, one is Reporting, because it needed a different release cycle than tied directly to the application.

The only thing to be careful of is to make sure you uncheck the box "drop items that don't exist" (or whatever it's called). when deployments are made. Basically, making sure that only new or changed objects get deployed and artifacts that are in the target database don't get dropped.

answered Jun 9 at 19:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.