首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Symfony原则/迁移: diff未定义

Symfony原则/迁移: diff未定义
EN

Stack Overflow用户
提问于 2022-08-22 10:38:30
回答 1查看 192关注 0票数 0

运行一个空白项目。我现在在我的composer.json里有这个

代码语言:javascript
复制
    "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时,我看到以下命令:

代码语言:javascript
复制
 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时,它说没有定义该命令。有人知道问题出在哪里吗?

EN

回答 1

Stack Overflow用户

发布于 2022-08-23 07:08:14

我想你需要php bin/console doctrine:migrations:diff

diff:通过将当前数据库与映射信息进行比较来生成迁移。

您可以在https://symfony.com/bundles/DoctrineMigrationsBundle/current/index.html#usage中查看更多内容。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73443780

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档