Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Database Migrations
Search
trumpi
September 08, 2012
Programming
150
2
Share
Database Migrations
A synopsis of the different database migration methods that exist - both good and bad!
trumpi
September 08, 2012
Other Decks in Programming
See All in Programming
Vibe NLP for Applied NLP
inesmontani
PRO
0
390
実践CRDT
tamadeveloper
0
500
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
200
t *testing.T は どこからやってくるの?
otakakot
0
180
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
370
Make GenAI Production-Ready with Kubernetes Patterns
bibryam
0
110
iOS機能開発のAI環境と起きた変化
ryunakayama
0
180
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
320
Coding as Prompting Since 2025
ragingwind
0
820
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
170
Don't Prompt Harder, Structure Better
kitasuke
0
730
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
230
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
440
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
240
The Curse of the Amulet
leimatthew05
1
11k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
520
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Documentation Writing (for coders)
carmenintech
77
5.3k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
890
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
320
The Pragmatic Product Professional
lauravandoore
37
7.2k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Transcript
Bringing the database schema up to date with a new
code base
Backup the database in a dev environment – restore it
in production The problem: Production data is completely overwritten by Dev data
Use a database schema synchronisation tool The problem: Can still
be destructive
Script every change IF NOT EXISTS (…) Becomes a problem
if a script undoes the changes of a previous script
Write scripts that check a version table Add a row
to the version table if the script is successful The best approach, but scripts are difficult to write Transactions are tricky Rolling back is difficult
Library that provides an API for database changes Transactions and
the version table is handled behind the scenes Provides forward and backward migration Libraries available in .NET • FluentMigrator • Migrator.NET
None
Always back up the database before a migration Rather restore
the database than run the “Down” migration
…but don’t be “that guy”.