1

How to generate a database from Symfony's existing code through command line ?

we have an existing code with us we need to do a type of reverse engineering to generate the database tables related to that code we have tried commands like:

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

We are new to Symfony....!

1
  • What do you mean by "existig code"? Is it Doctrine 2 entities? Commented Jul 5, 2013 at 11:13

2 Answers 2

3

app/console doctrine:database:create then followed by app/console doctrine:schema:update --force

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

Comments

1

php app/console doctrine:schema:update --force is the right one also you can dump sql queries with --dump-sql

1 Comment

we tried all command from symfony.com/doc/current/book/doctrine.html but is it possible do it vice versa i mean generate database from code (entity)

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.