When I try to migrate doctrine:migrations:migrate
, I get this exception: "The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue.". This only occurs when trying to do a migration on the production environment. When I use the doctrine:migrations:sync-meta-storage
command, it throws the same exception.
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
I am using Symfony 5 and using DoctrineMigrationsBundle version 3.0 to do migration tasks.