Domesticating Databases: Continuous
Database Delivery
• Wes Higbee
• www.weshigbee.com
• @g0t4
Shared Dev DB
Shared
Dev
Prod
Images in this slide deck are from presentermedia.com, images may not be redistributed
Refactoring
discouraged
Debug nightmare
What changed?
Who
Why
Network drops
Remote work
Stepping on toes
Drawbacks of Shared Dev DB
Easily share
changes
Beefy server
Environment like
prod
No DB setup
Advantages of Shared Dev DB
What Changed?
Prod
Shared
Dev
• Prod• Dev
Path Matters
People
Name
Address
MailingAddress
People
Name
Address People
Name
MailingAddress
Delayed releaseAnxietyMistakes
Data changes
No who, why, how,
when
Path matters
How?
Problems with Waiting
Continuous Database Delivery – Part 1
sql
Add color.sql
car color
car color
Part 1 – Track and Apply
• Payroll DB - greenfield
• Setup dedicated dev DB
• Create employees table
What You Will Build
What You Will Build
What You Will Build
What You Will Build
Continuous Database Delivery – Part 1
DevWorkflow
BEFORE
DEV
DEV
CHANGED
DEV
DEV
AFTER
BEFORE BEFORE / AFTER
Reverse
Engineer
Changes
Workflow
BEFORE
COMPARE
AFTER
DEV
AFTER?
Safely
Pulling
Changes
BEFORE
DEV
DEV
BEFORE
Two Cooks in the Kitchen
1 2 3 4
5?
5?
5 6
• Check when you pull
• Bump your version
• Fix your dev DB
• Backup 
• Test
• Push
6?
Manual Releases
Prod
Shared
Dev
Lack of feedback
and testing
Test in production
Environments
misaligned
Significant
downtime
Silos of
responsibility
Mistakes
Problems with Manual Releases
Continuous Database Delivery – Part 2
Prod
TEST
DEV DB Continuous
Integration
CI – Drop and Create
Pre Test Release
DEV DB
Continuous
Integration
PROD
Backup
TeamCity Setup
Build
Drop/Create DB
flyway migrate
ci drop and create.bat

Continuous Database Delivery