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
2
150
Database Migrations
A synopsis of the different database migration methods that exist - both good and bad!
trumpi
September 08, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
AgentCoreとHuman in the Loop
har1101
5
220
CSC307 Lecture 08
javiergs
PRO
0
670
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Oxlintはいいぞ
yug1224
5
1.3k
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
ぼくの開発環境2026
yuzneri
0
110
CSC307 Lecture 09
javiergs
PRO
1
830
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
610
Basic Architectures
denyspoltorak
0
660
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
440
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
The Curious Case for Waylosing
cassininazir
0
230
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
49
Typedesign – Prime Four
hannesfritz
42
2.9k
The Cult of Friendly URLs
andyhume
79
6.8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
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”.