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

Error when upgrading 3.5.2 > 3.6.4.2 #195

Closed
its-me-mario opened this issue Aug 3, 2019 · 8 comments
Closed

Error when upgrading 3.5.2 > 3.6.4.2 #195

its-me-mario opened this issue Aug 3, 2019 · 8 comments

Comments

@its-me-mario
Copy link

Description

I'm getting this error when trying to upgrade from 3.5.2 to 3.6.4.2 from the console.

1. Creating Maps content columns
- Create content column for Map Address in content table
    > alter column field_mapAddress in table {{%content}} to text ... done (time: 0.044s)
2. Creating new Maps table
    > drop index craft_maps_ownerId_ownerSiteId_fieldId_unq_idx on {{%maps}} ...Exception: SQLSTATE[HY000]: General error: 1553 Cannot drop index 'craft_maps_ownerId_ownerSiteId_fieldId_unq_idx': needed in a foreign key constraint
The SQL being executed was: DROP INDEX `craft_maps_ownerId_ownerSiteId_fieldId_unq_idx` ON `craft_maps`

Also, running ./craft migrate/all doesn't help.

Steps to reproduce

  1. run ./craft update simplemap from console

Additional info

  • Craft version: 3.2.8
  • Maps version: 3.5.2
  • PHP version: 7.1.26
  • Database driver & version: MySQL
  • Other Plugins:
        "topshelfcraft/wordsmith": "3.0.5",
        "craftcms/redactor": "2.3.3.2",
        "aelvan/imager": "v2.1.10",
        "craftcms/aws-s3": "1.2.4",
        "studioespresso/craft-dumper": "2.0.0",
        "solspace/craft3-calendar": "2.0.22",
        "mmikkel/incognito-field": "1.1.1.1",
        "algolia/algoliasearch-client-php": "^1.2",
        "willdurand/geocoder": "^3.3",
        "craftcms/guest-entries": "2.2.4",
        "spicyweb/craft-neo": "2.3.7",
        "superbig/craft3-mobiledetect": "1.0.2",
        "nystudio107/craft-seomatic": "3.2.18",
        "nystudio107/craft-webperf": "1.0.12",
        "aelvan/preparse-field": "v1.0.6",
        "nystudio107/craft-retour": "3.1.22",
        "ether/logs": "3.0.1",
        "spicyweb/craft-embedded-assets": "2.0.11",
        "nav33d/craft-fieldreveal": "1.0.1",
        "superbig/craft-vzaddress": "^2.0",
        "nategood/httpful": "^0.2.20",
        "spicyweb/craft-fieldlabels": "1.1.5",
        "solspace/craft-freeform": "3.2.3"
@j-greig
Copy link

j-greig commented Sep 6, 2019

Same issue here

@joshuabaker
Copy link

We’re also stuck at 3.5.2 on a couple of sites.

The problem originates at this dropIndex call due to foreign key constraints.

@Tam
Copy link
Member

Tam commented Sep 13, 2019

@its-me-mario Can you send a copy of your database to [email protected]?

@Tam
Copy link
Member

Tam commented Sep 17, 2019

@j-greig @joshuabaker Could you guys send us your databases as well?

@j-greig
Copy link

j-greig commented Sep 17, 2019

Don't think we can send you a full database dump for GDPR reasons (Craft Commerce project)... what else would help?

@joshuabaker
Copy link

@Tam Sorry but we have the same issue re GDPR. At present, there’s not comprehensive or easy way to anonymise a database dump from Craft.

We actually managed to run a migration without running into this. Restoring the database from production and running the migrations to the latest stable went without issue. Perhaps, at least in our case, it was a database state issue.

@its-me-mario
Copy link
Author

A version of the database was emailed.

I was able to work around the issue by uninstalling the plugin and manually removing the old DB table when I reinstalled but that resulted in some lost data. We have about 5 other sites that I would rather not have to go through that process. 😄

@j-greig
Copy link

j-greig commented Sep 26, 2019

We arrived at the same solution @its-me-mario - luckily we only had 2 instances of the map to put back in :)

@Tam Tam closed this as completed in a437157 Oct 15, 2019
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

4 participants