2

我只想生成一个新的迁移类

app/console doctrine:migrations:status

[Doctrine\DBAL\Migrations\MigrationException]
Migration version 20130915081732 already registered with class Doctrine\DBAL\Migrations\Version

我的 config.yml 看起来像

doctrine_migrations:
    dir_name:   %kernel.root_dir%/../src/Project/Migrations
    namespace:  Project\Migrations
    table_name: doctrine_migration_versions
    name:       Project Migrations

路径和命名空间是正确的,但此文件夹中已经有迁移(也是版本 20130915081732)。我不知道怎么了,也许你能帮帮我?

谢谢。

4

1 回答 1

0

I found it.

Background: It is a project migrated from Silex. And there was an old migration.xml in the doc root which had a wrong configuration. After deleting this file everything worked.

于 2014-04-25T17:06:24.100 回答