Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

What is Phinx? “Phinx is a tool that allows you to migrate your database schema over time”

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Why did I write it?

Slide 5

Slide 5 text

Brief History • Released in 2012 under the MIT License • 32 Releases to Date • 350,000 Downloads and 70+ Contributors • Used in CakePHP 3.0.0 • Built on top of Symfony Components (and only 3)

Slide 6

Slide 6 text

Rob Morgan • Writing PHP for almost 15 years • Twitter: @_rjm_ • Email: [email protected] • http://robmorgan.id.au

Slide 7

Slide 7 text

asd Australia

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Why Should I Use Phinx?

Slide 13

Slide 13 text

Here’s why: • Database Migration is not a new thing • Convenient way to change your schema over time • Write migrations using PHP code • Migrate up and down • Support (and tests!) for MySQL, PostgreSQL, SQLite and Microsoft SQL Server • Read: http://en.wikipedia.org/wiki/Schema_migration

Slide 14

Slide 14 text

Used in production, but technically it’s still pre 1.0.0

Slide 15

Slide 15 text

Today’s Agenda • Adding Phinx to your project • Writing Migrations • Executing Migrations • The State of Your Database • Rolling Back

Slide 16

Slide 16 text

Demo

Slide 17

Slide 17 text

What about Phinx 0.5.0?

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Seed Command

Slide 20

Slide 20 text

Cheers! • Rob Morgan (@_rjm_) • https://phinx.org • http://robmorgan.id.au • Slides will be on: https://joind.in/14273 • https://github.com/robmorgan/phinx-screencast