安装API平台后,我收到此错误,该错误与postgres docker postgres:10-alpine
设置有关。
bookshop-api git:(master)✗bin/console doctrine:database:create
In AbstractPostgreSQLDriver.php line 73:
An exception occurred in driver: SQLSTATE[08006] [7] FATAL: role "api-platform" does not exist
In PDOConnection.php line 31:
SQLSTATE[08006] [7] FATAL: role "api-platform" does not exist
In PDOConnection.php line 27:
SQLSTATE[08006] [7] FATAL: role "api-platform" does not exist
.env
文件是根据docker-compose.yml
更新的,但是默认的api/config/packages/doctrine.yaml
已更改为使用postgresql
。
答案 0 :(得分:0)
与在同一端口上运行的postgres本地实例发生冲突。