Skill 3.4.8

Implement a deployment that includes database tasks

Key Concepts

A state-based approach deploys a desired schema, such as a DACPAC with the SqlAzureDacpacDeployment@1 task. A migration-based approach runs ordered scripts, as with Entity Framework Core migrations or similar tools.

The expand and contract pattern adds new structures first, moves data and code across, and removes old structures in a later release. This keeps the old and new application versions compatible.