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
390
An Introduction to Design Patterns
austinsmorris
1
130
Other Decks in Technology
See All in Technology
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
550
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
230
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
330
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
270
Qiita埋め込み用スライド
naoki_0531
0
5.1k
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
290
podman_update_2024-12
orimanabu
1
270
UI State設計とテスト方針
rmakiyama
2
590
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
180
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
Featured
See All Featured
A Tale of Four Properties
chriscoyier
157
23k
Designing for Performance
lara
604
68k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Being A Developer After 40
akosma
87
590k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
How to Ace a Technical Interview
jacobian
276
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Writing Fast Ruby
sferik
628
61k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
A designer walks into a library…
pauljervisheath
204
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
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]