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
全社横断データ活用推進のコツと その負債とのつき合い方
masatoshi0205
0
160
mikroBus HAT を用いた簡易ベアメタル開発
tarotene
0
260
私はこうやってマインドマップでテストすることを出す!
mineo_matsuya
0
190
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
450
Postmanの日本市場におけるDevRel (的) 活動 / Postman's DevRelish activities in Japan
yokawasa
1
120
20241108_CS_LLMMT
shigashiyama
0
250
「視座」の上げ方が成人発達理論にわかりやすくまとまってた / think_ perspective_hidden_dimensions
shuzon
2
16k
形式手法の 10 メートル手前 #kernelvm / Kernel VM Study Hokuriku Part 7
ytaka23
5
740
Microsoft Intune アプリのトラブルシューティング
sophiakunii
1
390
Intuneお役立ちツールのご紹介
sukank
3
740
ZOZOTOWNでの推薦システム活用事例の紹介
f6wbl6
1
480
第23回Ques_タイミーにおけるQAチームの在り方 / QA Team in Timee
takeyaqa
0
180
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
BBQ
matthewcrist
85
9.3k
The Cult of Friendly URLs
andyhume
78
6k
Six Lessons from altMBA
skipperchong
26
3.5k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Unsuck your backbone
ammeep
668
57k
YesSQL, Process and Tooling at Scale
rocio
168
14k
Agile that works and the tools we love
rasmusluckow
327
21k
Building Your Own Lightsaber
phodgson
102
6.1k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
560
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
360
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]