gpt4 book ai didi

doctrine-orm - 学说迁移包 : Update Error after upgrade to Version 3

转载 作者:行者123 更新时间:2023-12-04 09:38:37 24 4
gpt4 key购买 nike

最近升级到了学说迁移版本 3,这是作为供应商库升级的一部分,所以我们现在有点被迫遵循 ;)

我们是这样配置的:

doctrine_migrations:
migrations_paths:
"DoctrineMigrations": "src/Migrations"

storage:
table_storage:
table_name: 'migration_versions'
version_column_name: 'version'
version_column_length: 1024
executed_at_column_name: 'executed_at'
execution_time_column_name: 'execution_time'

无论如何,我们会遇到以下奇怪的迁移错误。
bin/console doctrine:migrations:status给出这个“一切正常”的输出:
+----------------------+----------------------+------------------------------------------------------------------------+
| Configuration |
+----------------------+----------------------+------------------------------------------------------------------------+
| Storage | Type | Doctrine\Migrations\Metadata\Storage\TableMetadataStorageConfiguration |
| | Table Name | migration_versions |
| | Column Name | version |
|----------------------------------------------------------------------------------------------------------------------|
| Database | Driver | Doctrine\DBAL\Driver\PDOMySql\Driver |
| | Name | dwconnect2 |
|----------------------------------------------------------------------------------------------------------------------|
| Versions | Previous | DoctrineMigrations\Version20200522213838 |
| | Current | DoctrineMigrations\Version20200608142225 |
| | Next | Already at latest version |
| | Latest | DoctrineMigrations\Version20200608142225 |
|----------------------------------------------------------------------------------------------------------------------|
| Migrations | Executed | 18 |
| | Executed Unavailable | 0 |
| | Available | 18 |
| | New | 0 |
|----------------------------------------------------------------------------------------------------------------------|
| Migration Namespaces | DoctrineMigrations | src/Migrations |
+----------------------+----------------------+------------------------------------------------------------------------+

但是如果我们运行 bin/console doctrine:migrations:migrate --no-interaction它引发以下错误:
[ERROR] The version "latest" couldn't be reached, you are at version "DoctrineMigrations\Version20200608142225"  

我们的数据库看起来不错,因为我们将其清除并在何处运行所有迁移。

非常感谢任何帮助!
安德烈亚斯

最佳答案

所以归功于 this replyoriginal github issue :

bin/console doctrine:migrations:migrate --allow-no-migration --no-interaction

这会将错误转换为警告。

关于doctrine-orm - 学说迁移包 : Update Error after upgrade to Version 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62432871/

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