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

3.7.1 migration error #354

Open
maknapp opened this issue May 10, 2021 · 4 comments
Open

3.7.1 migration error #354

maknapp opened this issue May 10, 2021 · 4 comments

Comments

@maknapp
Copy link

maknapp commented May 10, 2021

Description

I am using PostgreSQL and I am getting a migration error when updating from 3.6.7 to 3.7.1.

*** applying m201207_124200_add_product_types_to_sitemap
Exception: SQLSTATE[42704]: Undefined object: 7 ERROR:  constraint "seo_sitemap_group_check" of relation "cr_seo_sitemap" does not exist
The SQL being executed was: ALTER TABLE "cr_seo_sitemap" DROP CONSTRAINT "seo_sitemap_group_check"

I checked that table and there is a constraint with a similar name: cr_seo_sitemap_group_check. My DB_TABLE_PREFIX environment variable is set to cr_. Should the migration check for that?

Steps to reproduce

  1. Install craft with a DB_TABLE_PREFIX
  2. Install SEO to 3.6.7
  3. Update to 3.7.1

Additional info

  • Craft version: 3.6.12
  • SEO version: 3.6.7
  • PHP version: 7.4.3
  • Database driver & version: PostgreSQL 12
  • Other Plugins:
@nickcobley
Copy link

nickcobley commented May 11, 2021

Same error over here coming from 3.6.3 to 3.7.1 but using MariaDB 10.3, and also have a table prefix in place and have verified the migration works if there is no prefix.

@flannelinc
Copy link

Same error for me. Anyone figure this out?

@maknapp
Copy link
Author

maknapp commented Mar 18, 2022

This was some time ago, but I believe I renamed the constraint to remove the prefix so that the migration had something to do. Something like this for postgresql:
ALTER TABLE "cr_seo_sitemap" RENAME CONSTRAINT "cr_seo_sitemap_group_check" TO "seo_sitemap_group_check"

And then run the update again.

@flannelinc
Copy link

@maknapp Didn't work for me, but thank you!

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

3 participants