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
Doctrine Migrations
Search
Austin Morris
February 11, 2014
Technology
1
110
Doctrine Migrations
It's like source control for you database!
Austin Morris
February 11, 2014
Tweet
Share
More Decks by Austin Morris
See All by Austin Morris
Apigility
austinsmorris
0
170
SOLID Demotivators
austinsmorris
1
400
An Introduction to Design Patterns
austinsmorris
1
140
Other Decks in Technology
See All in Technology
dbtとリバースETLでデータ連携の複雑さに立ち向かう
morookacube
0
680
自動化の第一歩 -インフラ環境構築の自動化について-
smt7174
1
130
Computer Use〜OpenAIとAnthropicの比較と将来の展望〜
pharma_x_tech
6
1k
本当に必要なのは「QAという技術」だった!試行錯誤から生まれた、品質とデリバリーの両取りアプローチ / Turns Out, "QA as a Discipline" Was the Key!
ar_tama
9
4.4k
Part1 GitHubってなんだろう?その1
tomokusaba
3
770
Terraform にコントリビュートしていたら Azure のコストをやらかした話 / How I Messed Up Azure Costs While Contributing to Terraform
nnstt1
1
490
MCP でモノが動くとおもしろい/It is interesting when things move with MCP
bitkey
2
490
AndroidアプリエンジニアもMCPを触ろう
kgmyshin
2
650
Sleep-time Compute: LLM推論コスト削減のための事前推論
sergicalsix
1
120
UIパフォーマンス最適化: AIを活用して100倍の速度向上を実現した事例
kinocoboy2
0
130
続・やっぱり余白が大切だった話
kakehashi
PRO
3
320
LINE 購物幕後推手
line_developers_tw
PRO
0
450
Featured
See All Featured
Designing for humans not robots
tammielis
253
25k
Raft: Consensus for Rubyists
vanstee
137
6.9k
Making the Leap to Tech Lead
cromwellryan
133
9.3k
Code Reviewing Like a Champion
maltzj
523
40k
For a Future-Friendly Web
brad_frost
177
9.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Code Review Best Practice
trishagee
68
18k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
105
19k
Transcript
Doctrine Migrations It’s like source control for your database! Austin
Morris Varsity News Network (We’re hiring!)
WTF?
Doctrine Migrations • Programmatic database version control. • Easy schema
deployment. • Let the ORM do the work! http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/
Installation
composer.json
Update Doctrine CLT
cli-config.php (Doctrine 2.4)
Configure Migrations
migrations.yml
New Commands!
$ vendor/bin/doctrine list migrations
Demo!
MyMDB
MyMDB.Entity.Movie.dcm.yml
Add $views
MyMDB.Entity.Movie.dcm.yml
Create Version $ vendor/bin/doctrine migrations:diff
MyMDB\DoctrineMigrations\VersionYYYYMMDDHHMMSS
$ vendor/bin/doctrine migrations:migrate
MyMDB
MyMDB
What else? • Migrate up and down (revert). • Migrate
across multiple versions. • Migrate to specific versions. • Dry-run migrations. • Manipulate data during migrations. • Symfony has DoctrineMigrationsBundle
Problems? • Kris?
Questions? @austinsmorris
[email protected]