gpt4 book ai didi

symfony - Doctrine :迁移:迁移。元数据存储不是最新的,请运行sync-metadata-storage命令解决这个问题

转载 作者:行者123 更新时间:2023-12-04 15:59:07 30 4
gpt4 key购买 nike

当我尝试迁移时 doctrine:migrations:migrate ,我收到此异常:“元数据存储不是最新的,请运行 sync-metadata-storage 命令来解决此问题。”。这仅在尝试在生产环境中进行迁移时发生。当我使用 doctrine:migrations:sync-meta-storage命令,它抛出相同的异常。

Doctrine _migrations.yaml:

doctrine_migrations:
# List of namespace/path pairs to search for migrations, at least one required
migrations_paths:
'DoctrineMigrations': '%kernel.project_dir%/migrations'

# List of additional migration classes to be loaded, optional
migrations:

# Entity manager to use for migrations. This overrides the "connection" setting.
em: default

storage:
# Default (SQL table) metadata storage configuration
table_storage:
table_name: 'doctrine_migration_versions'
version_column_name: 'version'
version_column_length: 1024
executed_at_column_name: 'executed_at'
execution_time_column_name: 'execution_time'

# Possible values: "BY_YEAR", "BY_YEAR_AND_MONTH", false
organize_migrations: false

# Path to your custom migrations template
custom_template: ~

# Run all migrations in a transaction.
all_or_nothing: false

我正在使用 Symfony 5 并使用 DoctrineMigrationsBundle 3.0 版来执行迁移任务。

最佳答案

尝试删除 .env 文件中的服务器版本

关于symfony - Doctrine :迁移:迁移。元数据存储不是最新的,请运行sync-metadata-storage命令解决这个问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62426630/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com