shyim / shopware-docker

Easy to use Docker Installation for Shopware 5 and Shopware 6
MIT License
115 stars 27 forks source link

db dump and restore via swdc #109

Closed zaifastafa closed 2 years ago

zaifastafa commented 3 years ago

Feature request

We can go into the mysql container and then run the mysqldump command, but it would be great if we can directly import and dump database via swdc similar to what we can do with ddev.

Also if we can have the option of the resetting/removing the DEFINER during the db import, it would be great. This would especially help when importing a live/staging system to our local database.

shyim commented 3 years ago

Hey,

you don't need to go the MySQL Container. Just place the sql file under Code/snapshots/[project-name].sql and run swdc rsnap [project-name]

It currently doesnt strips definers :thinking: but could be a good way :D

shyim commented 3 years ago

Can you provide me a file with definers? @zaifastafa . Files generated by swdc snap xx does not contain definers 🤔

zaifastafa commented 3 years ago

Oh by the way I also realized, the order and customer data does not get imported via dump due to I think the orderDate field, and other related fields which are calculated fields. Can you somehow allow that as well?

huzaifa@huzaifa:~/Downloads$ swdc rsnap sw6
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 3105 (HY000) at line 9409: The value specified for generated column 'order_date' in table 'order' is not allowed.
read unix @->/run/docker.sock: read: connection reset by peer