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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
940
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
AI & Enginnering
codelynx
0
110
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
180
Architectural Extensions
denyspoltorak
0
280
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
160
ぼくの開発環境2026
yuzneri
0
170
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
220
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Prompt Engineering for Job Search
mfonobong
0
160
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
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”.