概述 快速入门 教程 手册 最佳实践 组件 参考 贡献

发布于 2015-08-27 16:34:47 | 118 次阅读 | 评论: 0 | 来源: 网络整理

The Doctrine2 ORM integration offers several console commands under the doctrine namespace. To view the command list you can use the list command:

$ php app/console list doctrine

A list of available commands will print out. You can find out more information about any of these commands (or any Symfony command) by running the help command. For example, to get details about the doctrine:database:create task, run:

$ php app/console help doctrine:database:create

Some notable or interesting tasks include:

  • doctrine:ensure-production-settings - checks to see if the current environment is configured efficiently for production. This should always be run in the prod environment:

    $ php app/console doctrine:ensure-production-settings --env=prod
    
  • doctrine:mapping:import - allows Doctrine to introspect an existing database and create mapping information. For more information, see 如何通过已有库反向生成Entity.

  • doctrine:mapping:info - tells you all of the entities that Doctrine is aware of and whether or not there are any basic errors with the mapping.

  • doctrine:query:dql and doctrine:query:sql - allow you to execute DQL or SQL queries directly from the command line.

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务