~/talk

Database Schema Migrations with Zero Downtime

Talkat DevOpsDays Copenhagen 2019 · 2019-04-04..04-05· [databases]
slides:none on file

Company moves from infrequent releases to 50+ deployments per day and needs schema changes without downtime. Concrete recipe: record current state with a Flyway baseline snapshot, write non‑destructive migrations (add columns not rename), switch to dual-write + backfill so old code keeps working, then cleanup later. For heavy alters use replication switchover or pt-online-schema-change to avoid table locks. Rollbacks are avoided; prefer roll‑forward and careful monitoring of long migrations, locks, and shard or vendor limitations (Oracle noted).

AI-written summary · about

  1. 0:00Intro
  2. 1:2050+ DEPLOYS PER DAY
  3. 1:30HIGH AVAILABILITY
  4. 1:47DATABASE MIGRATIONS
  5. 2:18WITHOUT DOWNTIME?
  6. 2:30DATABASE SCHEMA MIGRATIONS
  7. 5:11TRANSACTIONS
  8. 6:15FLYWAY
  9. 7:56LEGACY APPLICATIONS
  10. 10:21UNDOING MIGRATIONS
  11. 10:49ROLL BACK OR ROLL FORWARD?
  12. 13:19RESTORING FROM BACKUPS?
  13. 13:34ROLLBACKS
  14. 13:46SIMPLE DEPLOYMENT FLOW
  15. 14:37CONTINUOUS DELIVERY
  16. 14:57CONTINUOUS DEPLOYMENT
  17. 15:10ZERO DOWNTIME DEPLOYS
  18. 16:00NO MIGRATIONS!
  19. 16:12DATABASE STATE?
  20. 17:38OLD APP SHOULD WORK WITH NEW STATE
  21. 18:01ONE DIFF BACK
  22. 18:23DECOUPLE
  23. 18:40NON-DESTRUCTIVE CHANGES
  24. 18:51BACKWARDS COMPATIBILITY
  25. 19:20EXAMPLE: RENAMING A COLUMN
  26. 22:21CHALLENGES
  27. 24:06STRATEGIES
  28. 26:03REPLICATION
  29. 26:23RUN MIGRATION ON FAILOVER
  30. 29:11PT ONLINE SCHEMA CHANGE
  31. 32:33RECAP
  32. 32:50MULTIPLE STEPS
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.