hi team, I follow the guide in this link (<https:/...
# docker
a
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
p
Hey, so expected behaviour imo: Redoing
docker/sdk up
should not delete the tables and reinsert from scratch.
👍 1
a
I think so too but not sure why it deletes all the new data after running command docker/sdk up
p
So are you sure that spryker default tables are disappearing? - I could imagine a file-sync problem:
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
w
1. 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 2. Do you use
docker/sdk up --data --build
(--data will propergate the data again)? If so, try without --data parameter
☝️ 1
👍 1
a
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
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?
Copy code
command: 'vendor/bin/console propel:tables:drop'
I suppose this command will drop all the table in DB each time docker/sdk up