Microsoft Certified: DevOps Engineer ExpertDesign and implement pipelinesMedium

A company is implementing a new release strategy for a business-critical application that relies on an Azure SQL Database. The application's release pipeline in Azure DevOps needs to include a step to automatically update the database schema as part of the deployment process. This update must be idempotent, version-controlled, and capable of handling both new deployments and upgrades. Which tool or approach is best suited for this requirement?

  1. AAzure CLI scripts with SQL commands
  2. BFlyway or Liquibase for schema migrations
  3. CAzure Data Factory pipelines
  4. DDACPAC deployment using Azure PowerShell
Show answer & explanation

Correct answer: B. Flyway or Liquibase for schema migrations

Tools like Flyway and Liquibase are specifically designed for database migration management. They provide version control for schema changes, ensure idempotency, and manage the application of scripts in a controlled, ordered manner, which is crucial for business-critical databases.

Why the other options are wrong

  • A. Azure CLI with raw SQL commands lacks version control, idempotency, and robust error handling for schema migrations.
  • C. Azure Data Factory is for data integration and ETL, not direct database schema migration.
  • D. DACPACs (Data-tier Application Packages) are good for deploying a complete database schema, but can be less flexible for incremental, version-controlled migrations compared to dedicated migration tools.

Database Schema Migration Tools

Tools like Flyway and Liquibase manage database schema changes in a version-controlled, incremental, and idempotent manner, ensuring consistent and reliable database updates.

  • Version control for schema changes.
  • Ensures idempotency (running a script multiple times has same effect).
  • Manages incremental updates.
  • Integrates with CI/CD pipelines for automated deployments.

Memory trick: Migrate your schema, Master your changes.

More Design and implement pipelines questions