0

I've got a huge problem with a propel migration in a symfony project. For the very first time, I tried to alter a column of table, but I always got the following error on CLI:

$ php symfony propel:up
>> propel    Executing migration PropelMigration_1340354091 up
>> Failed to execute SQL "ALTER TABLE `AEX_PROJECT` MODIFY `DESCRIPTION` VARCHAR(200)". Aborting migration. ...

My getUpSql() Method looks like this:

        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;
    ',
);
}

I'm running out of ideas. I also tried ALTER COLUMN or CHANGE. I also tried different kind of comma (eg. ' or " or no comma). It works, If I run the migration via PhpMyAdmin but not via Propel Migration.

I want to know if there is a known bug in Propel concerning that. Can I work around this somehow?

derphil
  • 385
  • 6
  • 25

1 Answers1

0

i think its a very basic error, you are passing varchar(2000) which is not acceptable for sure :) use varchar(255) or use text, check the documentation for text