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..
I have an interesting issue. @SprykerDevs In our project sometimes during deployments we get unexpec
I have an interesting issue. @SprykerDevs
In our project sometimes during deployments we get unexpected Propel migration failures.
Executing migration PropelMigration_xxxxx up Propel\Runtime\Exception\RuntimeException - Exception: Failed to execute SQL "CREATE SEQUENCE "spy_product_set_storage_pk_seq"". Aborting migration.
In such case somebody should login to DB and manually delete the culprit sequences and re-run the deployment, after that it works.
However, it is very annoying.
Does anybody also getting these errors? What could be the automatic workaround for such cases?
Comments
-
- do you run propel:migration:delete before propel:install ?
0 -
- if that fails, opening the migration and running the problematic query directly. it will help understand why it fails
0 -
It fails cause the sequence already exists, but somehow it is being automatically generated into the migration file..
0 -
As I wrote, when you manually delete the sequence, the same migration runs without errors. So I suppose that the issue is that propel:diff adds the sequence creation when it should not to.
0 -
π€ from what I see in my migrations, the sequence is always dropped at the end of migration, (otherwise migrations fails) is there that DROP in all your migrations?
0 -
The thing is that they are auto-generated and the process fails. We do not modify migrations. Standard process seems to be corrupted in some cases.
0 -
except that's not what I've been asking about π
0 -
but in case your migrations DO have the DROP and they didn't drop earlier, then it means someone performed migrtation that broke in the middle
0 -
and that could only happen when some other table failed due to implementation of NOT NULL column which has rows already and which need to be fixed manually before starting the migration
0 -
either way, I see no other reason for DROP to not be run, the one I mention already happend to us multiple times
0 -
Thanks, will have in mind your mentioned cases π
0 -
giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 π§π»βπ - Cadet
can u please post here the name of sequence?
i had a similar case and the problem was the length of sequence name (the same is for fk and index length)... then propel migration has every time dropped and inserted again and every time.. because there is a max length of name for index, fks and maybe also for sequence.0 -
These:
spy_product_concrete_storage_pk_seq spy_product_set_storage_pk_seq spy_product_abstract_storage_pk_seq
0 -
giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 π§π»βπ - Cadet
OK, then is not problem related the length... it is smth else...
Did u ckecked if these seq are maybe defined in different schema namespace?
0 -
I think propel just can't deal with sequence diffs properly. No ideas how.
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