Symfony学说/迁移:未定义diff

knpiaxh1  于 2022-11-16  发布在  其他
关注(0)|答案(1)|浏览(157)

运行一个空白项目。我目前在composer.json中有这个

"require": {
        "php": ">=8.1",
        "doctrine/doctrine-bundle": "^2.7",
        "doctrine/migrations": "^3.5",
        "doctrine/orm": "^2.13",
        "test/framework-bundle": "^6.1@dev", //my fork of framework-bundle latest. 
        "symfony/runtime": "^6.1"
    },

当我运行./vendor/bin/doctrine-migrations时,我看到以下命令:

migrations
  migrations:current                [current] Outputs the current version
  migrations:dump-schema            [dump-schema] Dump the schema for your database to a migration.
  migrations:execute                [execute] Execute one or more migration versions up or down manually.
  migrations:generate               [generate] Generate a blank migration class.
  migrations:latest                 [latest] Outputs the latest version
  migrations:list                   [list-migrations] Display a list of all available migrations and their status.
  migrations:migrate                [migrate] Execute a migration to a specified version or the latest available version.
  migrations:rollup                 [rollup] Rollup migrations by deleting all tracked versions and insert the one version that exists.
  migrations:status                 [status] View the status of a set of migrations.
  migrations:sync-metadata-storage  [sync-metadata-storage] Ensures that the metadata storage is at the latest version.
  migrations:up-to-date             [up-to-date] Tells you if your schema is up-to-date.
  migrations:version

没有diff。而且当我试图运行diff时,它说命令没有定义。有人知道问题是什么吗?

erhoui1w

erhoui1w1#

我觉得你需要
diff:通过将当前数据库与Map信息进行比较来生成迁移。
您可以在www.example.com上查看更多https://symfony.com/bundles/DoctrineMigrationsBundle/current/index.html#usage。

相关问题