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
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1.1k
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
AI & Enginnering
codelynx
0
110
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
AtCoder Conference 2025
shindannin
0
1k
AI時代の認知負荷との向き合い方
optfit
0
150
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
CSC307 Lecture 05
javiergs
PRO
0
500
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
520
The Curious Case for Waylosing
cassininazir
0
230
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Rails Girls Zürich Keynote
gr2m
96
14k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
From π to Pie charts
rasagy
0
120
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
sira's awesome portfolio website redesign presentation
elsirapls
0
140
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”.