Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doctrine - Unknown column type "mystoragetype" requested

Hi i am just getting error when i tried to update doctrine scheme in my Symphony App. I run

php app/console doctrine:schema:update --force   

and getting error this error

[Doctrine\DBAL\DBALException]                                                                                                                                                     
Unknown column type "mystoragetype" requested.
Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType().
You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypeMap().
If this error occurs during database introspection then you might have forgot to register all database types for a Doctrine Type.
Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes().
If the type name is empty you might have a problem with the cache or forgot some mapping information.           

I couldn't find anything related to "mystoragetype" in my project and also tried to add type but nothing happened. Could you figure it out why i am getting this error?

like image 387
MustafaB Avatar asked Sep 06 '25 03:09

MustafaB


1 Answers

Doctrine adds comments to fields with custom type: Something like:(DC2Type:mystoragetype). I think you generated schema with that type and had to remove type from entity. But comment remains in database.

like image 168
d3uter Avatar answered Sep 07 '25 21:09

d3uter