1

We use MySQL "enum" and "set" types in our project. And we need to reverse engineer existing DB. With the help of this http://docs.doctrine-project.org/projects/doctrine-orm/en/2.0.x/reference/tools.html#reverse-engineering recipe and custom "doctrine.php" I managed to run doctrine form "/vendors" and generate metadata. But this docs missing entities generation part. So I resorted to http://symfony.com/doc/2.0/cookbook/doctrine/reverse_engineering.html. And it seems that now for "app/console" I have to solve all the problems already solved in "doctrine.php". The question is how to at least do

$platform->registerDoctrineTypeMapping('enum', 'string');

so that it will work for "app/console doctrine"?

1 Answer 1

2

Looks like here it is http://symfony.com/doc/2.0/reference/configuration/doctrine.html#doctrine-dbal-configuration

Sign up to request clarification or add additional context in comments.

1 Comment

Looks like you got it. Adding : doctrine: dbal: .... mapping_types: enum: string Will allow you to reverse engineer from the command line. Note however if you attempt to recreate the database via command line your enum column will be created as a string. I've yet to find the solution to this!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.