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
150
SOLID Demotivators
austinsmorris
1
380
An Introduction to Design Patterns
austinsmorris
1
110
Other Decks in Technology
See All in Technology
AIQ株式会社 エンジニア向け会社紹介資料
aiqlab
0
370
疲弊しない!AWSセキュリティ統制の考え方 #devio_osakaday1
masahirokawahara
6
5.9k
"好き"との生活/Regularly update profile with GitHub Actions
judeeeee
0
150
SPI原点回帰論:事業課題とFour Keysの結節点を見出す実践的ソフトウェアプロセス改善 / DevOpsDays Tokyo 2024
visional_engineering_and_design
4
1.6k
NgRx Signal Store
rainerhahnekamp
0
120
現代CSSフレームワークの内部実装とその仕組み
poteboy
2
680
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
1
300
元インフラエンジニアに成る / Human Resources to Human Relations
bobtani
3
810
テストプロセスで大事にしていること #jasstnano
makky_tyuyan
0
130
Janus
bkuhlmann
1
490
Aurora MySQL v3(MySQL8.0互換)の オンラインDDLの罠挙動を全バージョンで検証した
yutakikai
1
150
アプリがつくるNOT A HOTELブランド
hokuts
1
450
Featured
See All Featured
Building Effective Engineering Teams - LeadDev
addyosmani
27
1.8k
Building an army of robots
kneath
300
41k
10 Git Anti Patterns You Should be Aware of
lemiorhan
646
57k
The Invisible Side of Design
smashingmag
294
49k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
1
1.3k
Agile that works and the tools we love
rasmusluckow
324
20k
Large-scale JavaScript Application Architecture
addyosmani
503
110k
Atom: Resistance is Futile
akmur
258
25k
What's in a price? How to price your products and services
michaelherold
237
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
11
4.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
15
1.4k
Embracing the Ebb and Flow
colly
79
4.1k
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]