[Flow] Installing TYPO3.Media

Jan Greth jan at greth.me
Thu Apr 24 09:09:46 CEST 2014


Hi,

I had similar problems. Check, check and double check, that the DB and 
all Tables are in "utf8_unicode_ci". That solved it for me.

Cheers Jan


Am 24.04.2014 07:49, schrieb Christian Loock:
> Hi Rik,
>
> I know this Error 1005 all to well. I had a similar issue with one of
> our own package. The problem is somewhat related to to foreign keys but
> I never figured out what exactly it causes. If you google for it, is
> inted that the field type of your foreign key might not be the same as
> in your referenced table. I ended up removing the Key in order to get it
> to work. Since this is a external package, you might want to report this
> as a bug to the Package Author. As a workarround you could try to remove
> the foreign key.
>
>
> On 23.04.2014 21:53, Rik Willems wrote:
>> 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!
>>
>> _______________________________________________
>> Flow mailing list
>> Flow at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>



More information about the Flow mailing list