What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi all, we have updated various packages including spryker/acl and are running into an error with t
Hi all,
we have updated various packages including spryker/acl and are running into an error with the migrations now:
Migrate database Executing migration PropelMigration_1624522485 up Propel\Runtime\Exception\RuntimeException - Exception: <error>Failed to execute SQL "DROP INDEX `spy_acl_groups_has_roles-fi_acl_group` ON `spy_acl_groups_has_roles`". Aborting migration.</error> in /data/vendor/propel/propel/src/Propel/Generator/Command/MigrationMigrateCommand.php (149)
The UP-migration looks like this:
# This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; DROP INDEX `spy_acl_groups_has_roles-fi_acl_group` ON `spy_acl_groups_has_roles`; CREATE INDEX `spy_acl_groups_has_roles-fi_acl_role` ON `spy_acl_groups_has_roles` (`fk_acl_role`); DROP INDEX `spy_acl_user_has_group-fi_acl_group` ON `spy_acl_user_has_group`; CREATE INDEX `spy_acl_user_has_group-fi_user` ON `spy_acl_user_has_group` (`fk_user`);
Comments
-
The migration is switching the index to another foreign key and fails due to existing data, regardless of the
SET FOREIGN_KEY_CHECKS = 0
.Can you please assist on how to handle this? Obviously using mysql as db engine.
0 -
Got it:
Fix the *.schema.xml files in src/Pyz/Zed/IndexGenerator/Persistence/Propel/Schema and possibly add the missing index definitions for spy_acl_groups_has_roles and spy_acl_user_has_group.0 -
The console commands say that these files are relevant for postgres only, but the obviously are relevant for mysql too.
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,082 ⚖️ - Guardians (admin)
The schema files are there to be database system independent - so yes, it is used for mysql and postgresql
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random