Symfony / Doctrine/ PostgreSQL

Symfony / Doctrine/ PostgreSQL

แปะไว้ประหยัดเวลาครั้งหน้า

เวลาจะสั่ง
(อ้างถึง http://symfony.com/doc/current/book/doctrine.html)

php app/console doctrine:database:drop –force
php app/console doctrine:database:create

เวลา set ใน app/config/parameters.yml

1. ต้องมี  single quote คร่อม
 database_password: “123456”

2. กำหนดให้ database_user เป็น “staff” ต้องสร้าง database ชื่อ staff ไว้ด้วย ไม่งั้นมันจะ 
SQLSTATE[08006] [7] FATAL:  database “staff” does not exist

สงสัยคนเขียน Symfony ใช้ MySQL เป็นหลัก

http://symfony.com/doc/current/book/doctrine.html

Leave a comment