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

[Version20230616085142] Recreate Foreign key checks for object_metadata_ table #15771

Merged
merged 5 commits into from
Aug 18, 2023

Conversation

dvesh3
Copy link
Contributor

@dvesh3 dvesh3 commented Aug 18, 2023

Changes in this pull request

follow up to #15746

Additional info

fixes problem with deleting objects

WHAT

🤖 Generated by Copilot at a98e6ab

This pull request adds auto-increment and uniqueness features to the object metadata tables and fixes the foreign key constraint. It modifies the migration class in Version20230616085142.php to implement these changes.

🤖 Generated by Copilot at a98e6ab

To improve the object metadata
We added a column called id
It auto-increments
And has a unique constraint
And the foreign key constraint is now valid

HOW

🤖 Generated by Copilot at a98e6ab

  • Import Dao class to generate foreign key name for object metadata tables (link)
  • Drop foreign key constraint on object ID column before dropping primary key constraint on object metadata tables in up function (link)
  • Add conditional statement to recreate foreign key constraint on object ID column with new column names and cascade options after adding unique constraint on object metadata tables in up function (link)
  • Drop foreign key constraint on object ID column before dropping auto-increment column on object metadata tables in down function (link)
  • Add conditional statement to recreate foreign key constraint on object ID column with original column names and restrict options after restoring original primary key constraint on object metadata tables in down function (link)

…ata_ table - fixes problem with deleting objects follow up to #15746
@dvesh3 dvesh3 added the Bug label Aug 18, 2023
@dvesh3 dvesh3 added this to the 10.6.8 milestone Aug 18, 2023
@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

dvesh3 and others added 2 commits August 18, 2023 11:15
Co-authored-by: robertSt7 <104770750+robertSt7@users.noreply.github.com>
robertSt7 and others added 2 commits August 18, 2023 13:11
Co-authored-by: Divesh Pahuja <divesh.pahuja@pimcore.com>
Co-authored-by: Divesh Pahuja <divesh.pahuja@pimcore.com>
@sonarcloud
Copy link

sonarcloud bot commented Aug 18, 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 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@robertSt7 robertSt7 merged commit 3d1df7e into 10.6 Aug 18, 2023
13 checks passed
@robertSt7 robertSt7 deleted the fix_object_delete branch August 18, 2023 12:02
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