A free and open-source book on ZF3 for beginners


13.5. Summary

In this chapter, we have learned about database migrations. Doctrine library provides you a component called Doctrine\Migrations which allows to implement and apply migrations.

A migration is some kind of change set which can be applied to database schema. You can apply a migration to upgrade the schema to its newer state, or you can revert a migration to downgrade schema to its previous state.

Migrations are useful, because they allow to store the history of schema changes and apply changes in a standard way. With migrations, you can easily keep your schema up-to-date on every development machine, and on testing, staging and production servers.


Top