[INFO] Extracting desired schema from model.xml [INFO] Connecting to staging database... [INFO] Drift detected: Column 'customer.tier' missing. [INFO] Generating plan: ALTER TABLE customer ADD tier VARCHAR(10); [INFO] Applying plan... Success. [INFO] Running data migration script (v2.4.1)... [INFO] Idempotent check passed. She turned to Marcus. "See? No 'Failed at step 4.' No manual fix."
"That's Chapter 14," Lena smiled. "Deployments are for structure. Releases are for code. Migrations are for both . We separate the 'schema lifecycle' from the 'application lifecycle.' We can roll back the app without nuking the database." devops for databases pdf
"See this?" she pointed. "We're still writing imperative scripts. 'Add column, then move data, then create index.' That's a recipe. It fails halfway through, and nobody knows what the kitchen looks like anymore." [INFO] Extracting desired schema from model
"But... print me that PDF. I want to read Chapter 11 again. The zero-downtime part." Success
Two weeks later, Lena and Marcus sat in the same room. The helpdesk chat was quiet. Jenkins was running a new pipeline—one that didn't just build a JAR file, but also built a database release package .
She flipped to Chapter 7: State-Based Database Automation .
"We need to treat the database schema like we treat our Terraform code. The source of truth isn't a folder of migration scripts numbered 001_to_099 . The source of truth is the desired state of the database."