14

i am using Symfony 1.4.8 and Mysql 5.5 i got this error when i run

symfony propel:build-all

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Type=InnoDB’ at line 1 1

tshepang
  • 12,111
  • 21
  • 91
  • 136
Bhanu Krishnan
  • 3,726
  • 1
  • 20
  • 40

2 Answers2

16

Fixed the issue. It seems that in the DDL, you can’t say “Type=InnoDB|MyISAM|Foo” anymore. You have to say “Engine=InnoDB|MyISAM” so edit one file

symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/builder /sql/mysql/MysqlDDLBuilder.php

Line 156, change it as follows:- $script .= “Engine=$mysqlTableType”;

Bhanu Krishnan
  • 3,726
  • 1
  • 20
  • 40
  • I have the same problem, but your solution doesn't work for me. I did the changes that you said, but when I do symfony propel:build-all, I've got the same error. Have I got to compile any file after of do the changes? – HenryOS Feb 26 '11 at 19:00
  • 2
    This made my day! I thought I would have to struggle into tomorrow, but I'm up and running now. Thanks! – sage Jul 20 '11 at 00:55
5

A good (better) alternative to manually patching sfPropelPlugin is to upgrade to Propel 1.5 with the sfPropel15Plugin. It doesn't have this issue with MySQL 5.5

Nathan
  • 3,842
  • 1
  • 26
  • 31