Symfony really gives me headache sometimes. It took me an hour to figure it out this time. This was my problem:
When executing the command
php symfony doctrine:build --all
I got this error:
SQLSTATE[HY000]: General error: 1005 Can't create table
It may be that you are trying to set a relation between two tables but the references have different types. In Symfony 1.2 sfDoctrineGuardPlugin use a integer(4) (INTEGER) as primary key. In Symfony 1.4 sfDoctrineGuardPlugin use a integer(4) (BIGINT) as primary key.
It’s a good thing to know and I hope you didn’t spend that much time trying to solve this yourself. Blog about this article to help others.

One comment
If you call the command with -t switch, you will get a trace whenever an error occurs. This greatly helps in finding the relevant Table.