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
migrationツールについて
Search
carotene4035
December 18, 2018
0
88
migrationツールについて
carotene4035
December 18, 2018
Tweet
Share
More Decks by carotene4035
See All by carotene4035
GraphQLのN+1問題を解決したい
carotene4035
1
210
読者を置き去りにする技術
carotene4035
13
8.1k
Aws is emotional.
carotene4035
2
280
名称未設定.pdf
carotene4035
0
210
AWSネットワーク入門
carotene4035
2
310
adtech history
carotene4035
0
74
ファイルアクセスに関する脆弱性
carotene4035
0
110
僕らだけのアニメを放映する
carotene4035
3
1.3k
使いやすい広告管理画面について考えてみる
carotene4035
0
46
Featured
See All Featured
Designing for Performance
lara
610
69k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Music & Morning Musume
bryan
46
6.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Into the Great Unknown - MozCon
thekraken
40
1.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Faster Mobile Websites
deanohume
307
31k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
980
Speed Design
sergeychernyshev
32
1k
Transcript
migration πʔϧʹ͍ͭͯ Carotene4035
։ൃதʹࠔΔ͜ͱ • ζϨ • ։ൃڥͷζϨ • ιʔείʔυͷόʔδϣϯͷζϨ • ڥมͷζϨ •
DBͷεΩʔϚͷζϨ
DBεΩʔϚͷζϨ • ιʔείʔυಉ͡ɺ ͰDBεΩʔϚ͕ζϨ͍ͯΔͱΤϥʔ͕ͰΔ ʢଘࡏ͠ͳ͍ΧϥϜΛࢀরͯ͠͠·ͬͨΓͳͲʣ • ։ൃڥͱຊ൪ڥͰDBεΩʔϚ͕ζϨΔͱ ҙਤ͠ͳ͍όά͕͋Δ͔
ζϨΛ͙ʹ • ͦͷ̍ confluenceͳͲͷπʔϧͰཧ • ͦͷ̎ migrationπʔϧͰཧ
ͦͷ̍ • confluenceͳͲͰཧ • ॳΊશ෦createจͰཧ • ঃʑʹalterจΛͳΒͯεΩʔϚมߋΛ͚Ճ͍͑ͯ͘ • نʹΑͬͯಛʹͳ͍
ͦͷ̍ • ߟ͑ΒΕ͏Δ • ʮ͜ͷڥͰɺͲͷalter·Ͱྲྀ͚ͨͬ͠ʯ • ڥ͝ͱʹͲ͜·Ͱྲྀ͔ͨ͠ΛϝϞ͢ΕOK
ͦͷ̍ • ߟ͑ΒΕ͏Δ • ʮࣗͷڥͰͲ͜·Ͱྲྀ͚ͨͬ͠…ʯ • ͓͚֮͑ͯOKʢ͠ΜͲ͘ͳ͖ͬͯͨʣ
ͦͷ̍ • ߟ͑ΒΕ͏Δ • ʮࠓͷιʔείʔυͷ࣌ͬͯͲ͏͍͏εΩʔϚ͚ͩͬʯ
ζϨΛ͙ʹ • ʮͲͷڥʯͰʮͲͷSQLʯΛʮͲ͜·Ͱྲྀ͍ͯ͠Δ͔ʯ ͕Θ͔͚ΕΑ͍
ͦͷ̎ • migrationπʔϧ • ʮͲ͜·Ͱྲྀ͔ͨ͠ʯΛςʔϒϧ্Ͱཧ • ʮͲͷڥʯͰʮͲ͜·Ͱྲྀ͍ͯ͠Δ͔ʯ͕Θ͔Δ • ͔͠ɺ·ͩྲྀ͍ͯ͠ͳ͍sqlΛྲྀ͢ʹ sql-migrate
up ͱ͢Δ͚ͩͰྲྀΕΔ
͚ͬ͜͏͍Ζ͍Ζ͋Δ
࣮ԋ