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
150
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
業務時間外もAIに働いてもらう話
colorful12
2
9.1k
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.2k
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
450
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.3k
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
320
Cloudflare is Agents
chimame
0
190
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
320
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
160
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
120
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
670
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
250
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
360
Become a Pro
speakerdeck
PRO
31
6.2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Statistics for Hackers
jakevdp
799
230k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
500
Side Projects
sachag
455
43k
Mind Mapping
helmedeiros
PRO
1
340
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Leo the Paperboy
mayatellez
8
2.2k
Believing is Seeing
oripsolob
1
200
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”.