-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade From 2.x to 3.0.0 #329
Comments
For me, it doesn't work to run the command php bin/console doctrine:migrations:sync-metadata-storage |
weird, that did the trick for my application - do you get some error from that command? |
I updated the configuration file |
But i get the same error to run the sync-metadata-storage |
Can you share your doctrine_migrations.yaml file? |
what is the actual error? |
The metadata storage is not up to date, please run the sync-meta |
sure, doctrine_migrations:
migrations_paths:
'DoctrineMigrations': '%kernel.project_dir%/src/Migrations'
storage:
table_storage:
table_name: 'migration_versions'
version_column_name: 'version'
version_column_length: 512
executed_at_column_name: 'executed_at' I needed to adjust that Also note that you could get more information about that error if you add |
@corlanalexandru do you have some custom type mappings on the datetime type? |
I deleted the migration_version table, then i ran php bin/console doctrine:migrations:sync-metadata-storage and when I ran php bin/console doctrine:migrations:migrate i still get the same error |
New |
can you please answer to #329 (comment) ? |
I don't have. All entities were generated from command line with basic types |
@tarlepp the doc does not mention that becase if you run just but maybe adding a note on the upgrading guide will no hurt |
@goetas I'm just thinking people who will migrate their current production application to use this - and specially with use case that there isn't new migration file to run. |
@tarlepp who has some CI, and runs |
When I just tried this I
|
@inverse the wording of that message is misleading, but that just means that you are already at the latest version, it will be improved by doctrine/migrations#988 |
This is something that I didn't know - that I need to run that command. Is there some doc about that? |
Okays - so it's not an error - but considering that it returns non Can confirm also that the sync command is not needed - just verified locally |
there is |
@goetas the problem is that when you run migrate on 2.x it returns 0 even when there is no migrations to be ran. To me this feels like quite a BC since on CI it'll fail the deployment since the migrations were not deemed success.
|
@corlanalexandru you could add that |
I agree. This should be in the upgrade note. |
updated doc in doctrine/migrations#993 |
@pawellen can you please check #329 (comment) ? |
@goetas I don't have any. Maybe one of those causes problem: I am not sure if this can help somehow. Those are all my mappings lines: report.txt I don't know what to look for, there is no mention in doc how this new "sync-metadata-storage" command works. |
Ref: symfony/orm-pack#24 |
Is there any reason why the suggested value for "version_column_length" is 1024? |
I think we can close this issue, and continue those other problems with separated issues - so it's easier to keep things together. |
Currently
UPGRADE.md
doesn't mention that./bin/console doctrine:migrations:sync-metadata-storage
command should be executed - is there some reason for this or is the documention just missing this part?The text was updated successfully, but these errors were encountered: