Doctrine migrations

I’m using Doctrine as ORM in my PHP projects. I want to be able to generate my migration classes before I’m deploying my code. So I can include them into the release. To do this I need to be able to compare the current database (or model) with the changes made to the model.

Are there any best practices to achieve this? Perhaps someone has another idea on how to achieve this.

Links to used Doctrine libs:
Doctrine ORM
Doctrine Migrations

If you are using Doctrine migrations, don’t the autogenerated migration scripts already include the things that have changed in your model?

Doctrine explicitly states NOT to do this in production environments. What I could do is run migrations on my staging environment and store the migrations to update the production environment.