Symfony gives me headache

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.

If you call the command with

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.

Why so serios?

Why so serios? http://www.youtube.com/watch?v=5P6UU6m3cqk 00sERkSEx VIdeOsWQj

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <strong> <cite> <code> <b> <i>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.