Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Latest commit

 

History

History
19 lines (12 loc) · 783 Bytes

File metadata and controls

19 lines (12 loc) · 783 Bytes

Changing the database

While developing you sometimes need to change the database. But to be able to change the database on the server while deploying instead of doing these changes manually we will use migrations.

Migrations in the framework are handled by the DoctrineMigrationsBundle.

Usage

Basically it is simple. The only thing you have to do when you need to change the database structure is to change the annotation/configuration/... and run:

app/console doctrine:migrations:diff

This will generate a migration-class which you can commit along your changes. Of course you will need to run the migration to update your own database:

app/console doctrine:migration:migrate