quinta-feira, 10 de agosto de 2017

Doctrine 2 command sheet

orm:schema-tool

  • vendor/bin/doctrine orm:schema-tool:create: creates database's tables and their columns from scratch according the Entities Metadata.
  • vendor/bin/doctrine orm:schema-tool:update [--dump-sql] [--force]: update database's tables and their columns according the Entities Metadata.

orm:convert-mapping

  • vendor/bin/doctrine orm:convert-mapping [--from-database] [destination metadata type] [destination folder path]: convert Entities Metadata files from the current format to [destination metadata type] format and save them on [destination folder path].
    • The available values for [destination metadata type] are: xml, yaml and annotation.
    • If the param [--from-database] was suplied the input Metadata used to produce the output Metadata will be the current database's tables, instead of current Metadata infos. This is a great way to reverse ingeneer a database to Entities.

orm:generate

vendor/bin/doctrine orm:generate:entities [destination folder path]: generate Entities Classes files from the current Metadata files.

source: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/tools.html

Nenhum comentário:

Postar um comentário