[Flow] Upgrade from FLOW3 1.1 to Flow 2.0: error with doctrine:migrate
Robert Lemke
robert at typo3.org
Tue Aug 27 11:06:28 CEST 2013
Hi François,
François Suter wrote:
> I got further, generated the migration file and tried to execute it, but
> I run into the same kind of problem:
>
> $ ./flow doctrine:migrationexecute --version 20130826170217 --direction up
>
> Uncaught Exception
> An exception occurred while executing 'ALTER TABLE
> cobweb_monitoring_domain_model_server DROP PRIMARY KEY':
>
> SQLSTATE[HY000]: General error: 1025 Error on rename of
> './flow3_test/#sql-c9_7' to
> './flow3_test/cobweb_monitoring_domain_model_server' (errno: 150)
This may be a foreign key constraint issue. This is generally tricky,
but not impossible to solve - key is to find the right order in which
you can drop primary keys and constraints so nothing else still depends
on it.
You'll always see that medium-helpful error message with code no. 150.
Fortunately there's a way to see a bit more: right after the error
occurred, run a "SHOW ENGINE INNODB STATUS;" query.
http://dev.mysql.com/doc/refman/5.7/en/show-engine.html
If you don't really need the old database migrations, the easiest way to
solve these kinds of problems is to delete your custom migrations and
create a fresh one based on Flow 2.0.
In order to get you old data imported, you'll have to export only the
data, not the structure, from your old database, and rename the primary
keys through a search & replace. You should then be able to import that
modified dump into your Flow 2.0 database.
Hope that helps,
Robert
More information about the Flow
mailing list