Skip to content
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

Migration not applying? #18

Open
tremby opened this issue Dec 7, 2021 · 1 comment
Open

Migration not applying? #18

tremby opened this issue Dec 7, 2021 · 1 comment

Comments

@tremby
Copy link

tremby commented Dec 7, 2021

I see from a comment in #15 that a migration was added to update fields of type VzUrl to the new full class name.

I'm working on the upgrade of a legacy site from Craft 2 to 3 at the moment, and though the migrations table of the database says this migration his been run, I still see lots of results if I run select * from craft_fields where type='VzUrl';.

Could something be wrong with the migration? Or what might have gone wrong on my end?

I also noticed that I have type: VzUrl in yaml files in config/project/fields/... and config/project/matrixBlockTypes/..., and also in the craft_projectconfig table of the database. Do these need to be updated too?

@tremby
Copy link
Author

tremby commented Dec 9, 2021

I deleted the migration's row from the craft_migrations table and ran the migration again via php craft migrate/up --plugin=vzurl and it seemed to work correctly this time.

I don't know if something went wrong during installation (but if the migration failed or didn't run then why would it be listed as complete in the craft_migrations table?), or what happened.

I then manually updated type: VzUrl to type: elivz\vzurl\fields\VzUrlField in the yaml files. I didn't touch the craft_projectconfig table of the database. Instead I ran php craft project-config/apply and everything seems to be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant