FriendsOfShopware / shopware-cli

CLI for Shopware Account and Shopware 6
MIT License
84 stars 32 forks source link

When `project dump` produces `Unknown command '\"'.` on import into mysql #433

Open func0der opened 1 week ago

func0der commented 1 week ago

PHP Version

irrelevant

Shopware Version

irrelevant

Plugin Version

0.4.59

Actual behaviour

If I try to import the dump into the database, I get the error Unknown command '\"'. from the mysql command

Expected behaviour

A successful import of the database

Steps to Reproduce?

  1. Create a dump: shopware-cli project dump --username db --password db --host db db
  2. Try to import the dump: mysql -udb -pdb db < dump.sql

It is basically the plugin table that is not properly functioning:

LOCK TABLES `plugin` WRITE;

INSERT INTO `plugin` (`id`, `name`, `base_class`, `composer_name`, `active`, `managed_by_composer`, `path`, `autoload`, `author`, `copyright`, `license`, `version`, `upgrade_version`, `icon`, `installed_at`, `upgraded_at`, `created_at`, `updated_at`) VALUES
( UNHEX('030b86417c7747719384acbf47236cf8'), 'KlarnaPayment', 'KlarnaPayment\\KlarnaPayment', 'klarna/payment', '1', '0', 'custom/plugins/KlarnaPayment', '{\"psr-4\":{\"KlarnaPayment\\\\\":\"src\\/\"}}', 'Klarna Bank AB (publ), Kellerkinder GmbH', '(c) Klarna Bank AB (publ)', 'MIT', '1.10.064', NULL, '?PNG\r\n\Z\n\0\0\0\rIHDR\0\0\0(\0\0\0(\0\0\0???m\0\0?IDATX??=hA??1?\"?D???,E?iD!??   ?F???JD;?BD;????X???G#?Qset$?3???Uxܹg?ywvv?yԄ?'S|~??f?K8熀U?,>??,Z?fFUc]?<?|??{??=?^?Wg?\"??4mpC)b2???i?[?HϲH \\h??6?????:?60???f?4????H??H?\r?"E?\"???Y?>?ڔk????=}?@hcN(m?n?v?,ҏ??9Bs\nX????snp(?u?3?/Y???? p??xYg??Š????U???{,?????v??Wy)???\\l?8mN??l?????oT?2?x*?{T?V?b`???|?????q??P??3???=8???j0$?\0^???w?U?U?A?=l??*غ? :!rk??\Z\0?0?Qs$????????0?t1\'????9??e0?? ????.g?????P??????ܘw?0??B??r?2ўy1?j?????\0_??\"?w??9E?gYE|????z??f??y?1???51Gʟ??HsE???-ѴA?絘\'?`(?g??Ù?1??̿??a`I6?c??G:?????????ܖ?0\0\0\0IEND?B`?', '2022-04-12 14:11:25.606', '2023-10-08 21:25:08.233', '2022-04-12 14:11:23.417', '2024-10-25 12:00:43.283' );
UNLOCK TABLES;
shyim commented 1 week ago

Could you provide a regular mysqldump of plugin table? So I can reproduce it? I installed locally the Klarna Plugin and exported and imported it successfully on mariadb 11.5.2

func0der commented 4 days ago

plugin.sql.gz

There you go. :)