Question 620
A migration adds a NOT NULL column to a table with millions of existing rows and fails because no value is available for old records. A release contains an irreversible transformation but the deployment plan says rollback is just redeploying the old database project. Which course of action addresses the stated issues?
Explanation
Correct Answer
First, existing data must satisfy new column constraints during deployment, not only future inserts. Second, reverting a schema definition cannot recreate data already deleted or transformed irreversibly.
Incorrect Answers
Stage the change with a backfill or safe default and validate constraints before enforcing NOT NULL; Detect schema drift against the SQL Database Project and reconcile approved exceptions before publishing deployment: reverting a schema definition cannot recreate data already deleted or transformed irreversibly.
Review the schema diff and implement an explicit data-preserving rename or migration before allowing deployment; Prepare a validated data backup or forward-fix recovery approach and test it before the change window: existing data must satisfy new column constraints during deployment, not only future inserts.
Stage the change with a backfill or safe default and validate constraints before enforcing NOT NULL.



Developing AI-Enabled Database Solutions (DP-800) Practice Tests