Is there any command in doctrine which can create db table from YAML. I can see we can create YAML from DB using ./doctrine generate-yaml-db
But How can we achieve the reverse feature of this. from yaml to db.
is there any command something like this
./doctrine generate-db-yaml
Generating a database from a yaml file must be done in two steps.
Generate the models from the yaml file using Doctrine_Core::generateModelsFromYaml().
Generate the database from the models using Doctrine_Core::createTablesFromModels().
I suggest writing a command-line script to call both these functions in sequence, and to automate a few other necessary steps. Here is the core of the script I use to re-generate my database.