symfony 1.4 propel:build-all not working on Mysql

2019-02-04 13:04发布

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

2条回答
乱世女痞
2楼-- · 2019-02-04 13:26

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

查看更多
淡お忘
3楼-- · 2019-02-04 13:39

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”;

查看更多
登录 后发表回答