2011年10月20日木曜日

Doctrine - コマンドメモ

① データベースの作成
php app/console doctrine:database:create

② Entity Class の作成
php app/console doctrine:generate:entity --entity="AcmeStoreBundle:Product" --fields="name:string(255) price:float description:text"
ちなみに、Doctrineで扱えるフィールドタイプについては、http://docs.symfony.gr.jp/symfony2/book/doctrine.html#book-doctrine-field-typesや、http://www.doctrine-project.org/docs/orm/2.0/en/reference/basic-mapping.html#doctrine-mapping-types に載ってあります。



③ テーブル/スキーマの作成
php app/console doctrine:schema:update --force


④ Entity Class の更新
php app/console doctrine:generate:entities Acme

0 コメント:

コメントを投稿

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More