[Flow] Installing TYPO3.Media

Rik Willems rik at metmeer.nl
Wed Apr 23 21:53:52 CEST 2014


Hi Christian,

I setup a fresh database and installed TYPO3.Media. I end up with these 
errors after doing a migrate a first and second time. What can I do?

Cheers!


rikwillems$ ./flow doctrine:migrate

Uncaught Exception
   An exception occurred while executing 'ALTER TABLE
   typo3_media_domain_model_image ADD CONSTRAINT
   typo3_media_domain_model_image_ibfk_1 FOREIGN KEY (resource) REFERENCES
   typo3_flow3_resource_resource(flow3_persistence_identifier)':

   SQLSTATE[HY000]: General error: 1005 Can't create table
   'flow.#sql-4b51_32c' (errno: 150)

More Information
   Exception code      #0
   File 
/Users/rikwillems/Sites/flow.loc/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php 
line 47


rikwillems$ ./flow doctrine:migrate

Uncaught Exception
   An exception occurred while executing 'CREATE TABLE
   typo3_media_domain_model_image (flow3_persistence_identifier VARCHAR(40)
   NOT NULL, resource VARCHAR(40) DEFAULT NULL, title VARCHAR(255) DEFAULT
   NULL, width INT DEFAULT NULL, height INT DEFAULT NULL, type INT DEFAULT
   NULL, imagevariants LONGTEXT DEFAULT NULL COMMENT '(DC2Type:array)',
   INDEX IDX_7FA2358DBC91F416 (resource), PRIMARY
   KEY(flow3_persistence_identifier)) ENGINE = InnoDB':

   SQLSTATE[42S01]: Base table or view already exists: 1050 Table
   'typo3_media_domain_model_image' already exists

More Information
   Exception code      #0
   File 
/Users/rikwillems/Sites/flow.loc/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php 
line 47





Christian Loock schreef op 23-04-14 10:55:
> Hi,
>
> you can also use ./flow doctrine:migrationstatus to see which migrations
> have run and which didn't.
>
> You can also use ./flow doctrine:validate to check if any Model Classes
> are causing issues.
>
> However, once you ran all migrations (as long as you use them aswell for
> your Package) you should be good to go without having to update manually
> using doctrine:update.
>
> You could also try to run ./flow doctrine:migrationgenerate to see if it
> will generate any additional migrations for your installation (do this,
> after all existing migrations have run).
>
> When you use migrations (which you should) you should never use
> doctrine:update because it might make future migrations break. When
> changing your models, you should use migrationgenerate to generate a
> migration and move the generated file to your Package's migration folder.
>
> See also
> http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartIII/Persistence.html#schema-management
> for further reference.
>
> Cheers!



More information about the Flow mailing list