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 team, I follow the guide in this link (
hi team, I follow the guide in this link (https://docs.spryker.com/docs/scos/dev/setup/installing-spryker-with-docker/installation-guides/installing-in-development-mode-on-windows.html#installing-spryker-in-development-mode-on-windows) to setup b2c demo shop. After setup successfully, I add new table to the DB eu-docker, then add some records but every time I run the command docker/sdk up, the command seems to re-install everything and import the data again, after that the new table and data which I already added above disappear( was removed after run command docker/sdk up)
I wonder whether this is expected default behavior for the b2c demo shop source code or not
I expected the data still persist in database after I run command docker/sdk up
Hope someone can give me some advice
Thanks in advance
Comments
-
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 โ๏ธ - Guardians (admin)
Hey, so expected behaviour imo: Redoing
docker/sdk up
should not delete the tables and reinsert from scratch.0 -
I think so too but not sure why it deletes all the new data after running command docker/sdk up
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 โ๏ธ - Guardians (admin)
So are you sure that spryker default tables are disappearing? - I could imagine a file-sync problem:
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 โ๏ธ - Guardians (admin)
you touch the schema-files inside the container but they are not properly synched to the host. when you do next time docker/sdk up it will sync from host to guest container without your schema files. Or something similar
0 -
- Tables should not be created manually but managed through Propel Schema definitions (https://docs.spryker.com/docs/scos/dev/back-end-development/zed/persistence-layer/database-schema-definition.html), which will make it persistent
- Do you use
docker/sdk up --data --build
(--data will propergate the data again)? If so, try without --data parameter
0 -
That is strange. I add manually the new record to the existing table, then run the command docker/sdk up but the new record is still gone
0 -
I try to comment this command, docker/sdk up again, then the new data is persisted
So the culprit is this command, am I right?command: 'vendor/bin/console propel:tables:drop'
I suppose this command will drop all the table in DB each time docker/sdk up
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 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
- 26 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