shopware / production

Shopware 6 production template
https://shopware.com
177 stars 151 forks source link

system:install --create-database --basic-setup fails for new setups on systems where binary logging is activated #60

Closed bestit-ewieser closed 3 years ago

bestit-ewieser commented 4 years ago

We are currently trying to setup a new shop at a hoster that has binary logging active for the database.

The system:install command fails with the following error: ERROR [app] Migration: "Shopware\Core\Migration\Migration1580218617RefactorShippingMethodPrice" failed: "An exception occurred while executing 'CREATE TRIGGER shipping_method_price_new_price_update BEFORE UPDATE ON shipping_method_price ...... SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled

Previously we could get around this by disabling BLUE_GREEN_DEPLOYMENT in the .env file.

A little while ago, a change was made to the system:install command enforcing BLUE_GREEN_DEPLOYMENT:

https://github.com/shopware/production/blob/df5b91f5483caa63160072cc3a1d0d5b1374caec/src/Command/SystemInstallCommand.php#L55

Is there some workaround for setups where binary logging is active?

shyim commented 4 years ago

Remove this lines https://github.com/shopware/production/blob/df5b91f5483caa63160072cc3a1d0d5b1374caec/src/Command/SystemInstallCommand.php#L55-L57 and have blue green disabled in env

bestit-ewieser commented 4 years ago

Thanks for your hint, that worked.

But wouldn't it be better to provide the necessary ENV-variable in the Command-call when necessary, instead of enforcing it in the code? e.g.: BLUE_GREEN_DEPLOYMENT=1 bin/console system:install --drop-database --basic-setup --force

As the comment above it already says that it is only for the tests to run properly.

shyim commented 3 years ago

Is fixed in meanwhile