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

fix: error in migration CoreBundle, IF EXISTS is not a valid MySQL 8 statement #15787

Merged

Conversation

youwe-petervanderwal
Copy link
Contributor

Error: An exception occurred while executing 'ALTER TABLE object_metadata_14 DROP FOREIGN KEY IF EXISTS fk_object_metadata_14__o_id':
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near '
IF EXISTS fk_object_metadata_14__o_id' at line 1
Caused by: "IF EXISTS" is valid in MariaDB but not in MySQL 8 Resolved with: checking existence via metadata

Linked to #15786

…statement

Error: An exception occurred while executing 'ALTER TABLE `object_metadata_14` DROP FOREIGN KEY IF EXISTS `fk_object_metadata_14__o_id`':
   SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;
   check the manual that corresponds to your MySQL server version for the right syntax to use near '
   IF EXISTS `fk_object_metadata_14__o_id`' at line 1
Caused by: "IF EXISTS" is valid in MariaDB but not in MySQL 8
Resolved with: checking existence via metadata
@github-actions
Copy link

Review Checklist

  • Target branch (11.0 for bug fixes, others 11.x)
  • Tests (if it's testable code, there should be a test for it - get help)
  • Docs (every functionality needs to be documented, see here)
  • Migration incl. install.sql (e.g. if the database schema changes, ...)
  • Upgrade notes (deprecations, important information, migration hints, ...)
  • Label
  • Milestone

@sonarcloud
Copy link

sonarcloud bot commented Aug 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@dvesh3 dvesh3 added the Bug label Aug 21, 2023
@dvesh3 dvesh3 merged commit de564ab into pimcore:10.6 Aug 21, 2023
14 checks passed
dvesh3 added a commit that referenced this pull request Aug 21, 2023
dvesh3 added a commit that referenced this pull request Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants