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
Basic Architectures
denyspoltorak
0
510
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
680
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
520
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
220
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
850
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
320
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
140
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.6k
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
2.6k
組織で育むオブザーバビリティ
ryota_hnk
0
130
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
400
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
120
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
180
A designer walks into a library…
pauljervisheath
210
24k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
57
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
49
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
110
Agile that works and the tools we love
rasmusluckow
331
21k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
2.9k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Testing 201, or: Great Expectations
jmmastey
46
7.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”.