Doctrine ORM orm:架构工具更新不起作用

时间:2017-08-16 12:19:26

标签: php doctrine-orm

我正在使用doctrine ORM并尝试update my database structure使用此命令:

$ vendor/bin/doctrine orm:schema-tool:update --force --dump-sql

但是,这是返回的内容:

Content-type: text/html; charset=UTF-8

You are missing a "cli-config.php" or "config/cli-config.php" file in your
project, which is required to get the Doctrine Console working. You can use the
following sample as a template:

<?php
use Doctrine\ORM\Tools\Console\ConsoleRunner;

// replace with file to your own project bootstrap
require_once 'bootstrap.php';

// replace with mechanism to retrieve EntityManager in your app
$entityManager = GetEntityManager();

return ConsoleRunner::createHelperSet($entityManager);

但实际上这个文件存在,见下文:

$ ls -la cli-config.php 
-rw-r--r-- 1 user user 135 Aug 13 20:26 cli-config.php

当我在本地开发机器上运行相同的命令时,它工作正常。只有当我尝试使用完全相同的直接结构的服务器时,它才会失败。知道为什么吗?

0 个答案:

没有答案