SQLSTATE[42S02]:找不到基表或视图:1146表';sf_sandbox.phpcr_workspac


SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sf_sandbox.phpcr_workspaces' doesn't exist

我安装了symfony标准版。在与parameters.yml进行了一些斗争之后,取得了进展。。。database_driver被设置为pdo_mysqln并继续运行,但是在不同的php文件中发生了6次相同的错误。错误为:

与后端对话时出现意外错误:执行'SELECT 1 FROM phpcr_workspaces WHERE name = ?' with params ["default"]: 时发生异常

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sf_sandbox.phpcr_workspaces' doesn't exist

有什么想法吗?

您必须使用当前模式信息更新数据库,其中包括在数据库中创建表:

# show the SQL commands to be applied (if you want to execute them yourself)
app/console doctrine:schema:update --force --dump-sql
# have Symfony apply the SQL commands
app/console doctrine:schema:update --force --complete