Symfony doctrine migrations up and down


You would like to run a migration in a symfony 2x project either up or down.


You can run the following for getting a migration up or down:






db:migrate or db:schema:load for Rails project with many migations







Rails model generator without migration

You want to run the rails model generator to create a new model, but you don’t want the migration for that model as it could be included in another migration (ie grouped together with other tables).

Just run the generator with the –migration=false option as in:

Rails 2 new ways

To get used to the new ways of working with Rails 2.

Here are some of the new ways of doing things in Rails 2.

  1. Create a scaffold and migration on one step:

    Make sure that you don’t have any previous migration(ie manually created) for the same model, as the generator will stop and won’t overwrite the previous migration.

cap deploy_with_migrations default behaviour

When using cap deploy_with_migrations, the default behaviour is to deploy with the migrations in the production environment.

To change this behavior add:

in your config/deploy.rb

:int and :integer problem in Ruby on Rails migration



It has to be :integer.
Full bug report and the article are here:
Migrations: :integer works, :int doesn’t – datatype discrepancy