0
我在symfony项目中推进移植时遇到了很大的问题。对于第一次,我试图改变表的列,但我总是得到的CLI以下错误:如何使用Propel Migration和Symfony修改表格的列
$ php symfony propel:up
>> propel Executing migration PropelMigration_1340354091 up
>> Failed to execute SQL "ALTER TABLE `AEX_PROJECT` MODIFY `DESCRIPTION` VARCHAR(200)". Aborting migration. ...
我getUpSql()方法是这样的:
public function getUpSQL()
{
return array (
'propel' => '
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until all tables are set.
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE `AEX_PROJECT` MODIFY `DESCRIPTION` VARCHAR(2000);
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
',
);
}
我没有想法了。我也尝试了ALTER COLUMN或CHANGE。我也尝试了不同的逗号(例如,'或'或者没有逗号)。它可以工作,如果我通过PhpMyAdmin运行迁移,但不通过Propel迁移。
我想知道Propel中是否存在已知错误关于这个问题,我能解决这个问题吗?