Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Database Schema Migrations with Doctrine

Database Schema Migrations with Doctrine

Diego Sapriza

April 29, 2014
Tweet

More Decks by Diego Sapriza

Other Decks in Technology

Transcript

  1. decouple code deploys from database migrations from to deploy &

    migrate deploy 1 deploy 2 migrate https://speakerdeck.com/nduthoit/the-path-to-smoother-database-migrations
  2. deploy 1 deploy 2 migrate code works before and after

    migration code depends on migration being completed https://speakerdeck.com/nduthoit/the-path-to-smoother-database-migrations decouple code deploys from database migrations
  3. + tips • nullable FK -> migrate data -> migrate

    code • test migrations in production backups
  4. Resources • http://en.wikipedia.org/wiki/Schema_migration • http://phinx.org • https://github.com/doctrine/migrations • https://speakerdeck.com/austinsmorris/doctrine-migrations •

    https://speakerdeck.com/nduthoit/the-path-to-smoother- database-migrations • https://speakerdeck.com/trumpi/database-migrations • https://speakerdeck.com/austinsmorris/doctrine-migrations