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
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
170
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
プロポーザルのつくり方 〜個人技編〜 / How to come up with proposals
ohbarye
4
300
Deno+JSRでパッケージを作って公開する
askua
0
110
第23回Ques_タイミーにおけるQAチームの在り方 / QA Team in Timee
takeyaqa
0
160
Team Dynamicsを目指すウイングアーク1stのQAチーム
sadonosake
1
180
DatabricksにおけるLLMOpsのベストプラクティス
taka_aki
4
1.6k
エンジニア候補者向け資料2024.11.07.pdf
macloud
0
4.5k
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
0
1.2k
AI機能の開発運用のリアルと今後のリアル
akiroom
0
230
ジョブマッチングサービスにおける相互推薦システムの応用事例と課題
hakubishin3
3
610
Shift-from-React-to-Vue
calm1205
4
1.7k
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
A designer walks into a library…
pauljervisheath
202
24k
BBQ
matthewcrist
85
9.3k
Building Adaptive Systems
keathley
38
2.3k
Visualization
eitanlees
145
15k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Being A Developer After 40
akosma
86
590k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Building an army of robots
kneath
302
42k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
42
2.2k
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]