Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade PS from 8.0.4 to 8.1.1 fail with installed module psgdpr 2.0.1 #33641

Closed
2 tasks done
PeNov opened this issue Aug 17, 2023 · 3 comments · Fixed by PrestaShop/psgdpr#214
Closed
2 tasks done

Upgrade PS from 8.0.4 to 8.1.1 fail with installed module psgdpr 2.0.1 #33641

PeNov opened this issue Aug 17, 2023 · 3 comments · Fixed by PrestaShop/psgdpr#214
Assignees
Labels
8.1.x Branch Autoupgrade Module: autoupgrade BO Category: Back Office Bug Type: Bug Database Label: Which BO under menu is concerned GDPR Module: psgdpr Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Module Module Verified The issue has been reproduced

Comments

@PeNov
Copy link

PeNov commented Aug 17, 2023

Prerequisites

Describe the bug and add attachments

Hello,
upgrade PS from 8.0.4 to 8.1.1 fail with installed module psgdpr 2.0.1.

Here is log:
log_804_to_811.txt

upgrade PS from 8.0.4 to 8.1.1 works after downgrade module psgdpr to 1.4.3.

Thank you
Best regards
PN

Expected behavior

Upgrade without fail.

Steps to reproduce

Standard 1-click upgrade process.

PrestaShop version(s) where the bug happened

8.0.4 to 8.1.1

PHP version(s) where the bug happened

7.4.33

If your bug is related to a module, specify its name and its version

psgdpr 2.0.1, autoupgrade 4.16.2

Your company or customer's name goes here (if applicable).

No response

@PeNov PeNov added Bug Type: Bug New New issue not yet processed by QA labels Aug 17, 2023
@paulnoelcholot paulnoelcholot added BO Category: Back Office Database Label: Which BO under menu is concerned Autoupgrade Module: autoupgrade GDPR Module: psgdpr Module Module 8.1.x Branch Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Ready Status: Issue is ready to be worked on Verified The issue has been reproduced and removed New New issue not yet processed by QA labels Aug 17, 2023
@paulnoelcholot
Copy link

Hello,

I reproduce the issue with PrestaShop version 8.1.1, I'll add this to the backlog so it can be fixed.

Please be aware that some issues might take a very long time to be resolved. If this one is important to you and you cannot wait for it to be fixed on the project’s own time, we strongly suggest you consider contacting a professional to help you.

If you fix the issue on your end, please contribute it back to the project. Remember that the more people contribute, the better PrestaShop becomes for everyone.

Thank you

image

image

@LarsGMortensen
Copy link

LarsGMortensen commented Aug 18, 2023

Hi guys

I also experienced an issue with db related to psgdpr when upgrading from 8.1.0 to 8.1.1

Prestashop version: 8.1.0
psgdpr version: 2.0.1
1-Click Upgrade version: 4.16.2
PHP version: 7.4.33
MySQL-version: 8.0.33-25

here is the log:

[CLEANING CACHE] File dev removed
[CLEANING CACHE] File prod removed
Cleaning file cache
API keys not present in parameters, generating
Keys generated using openssl_pkey_new, exporting private and public keys
Updating parameters file
Invalidating opcache for parameters file
Parameters file updated
Running opcache_reset
Initializing required environment constants
Checking version validity
Checking connection to database
Disabling all non native modules
[OK] SQL 8.1.1 SET SESSION sql_mode=''
[OK] SQL 8.1.1 SET NAMES 'utf8mb4'
[OK] PHP 8.1.1 : /* We forgot to update redirect_type in 8.1.0. This updates it, if it's not done already / / PHP:ps_811_update_redirect_type(); */
Updating database schema...
Executing: ALTER TABLE ps_authorized_application CHANGE name name VARCHAR(50) NOT NULL
Executing: ALTER TABLE ps_translation CHANGE key key TEXT NOT NULL COLLATE utf8_bin
Executing: ALTER TABLE ps_feature_flag CHANGE state state TINYINT(1) DEFAULT '0'
Executing: DROP INDEX id_customer ON ps_psgdpr_log
Executing: DROP INDEX idx_id_customer ON ps_psgdpr_log
Executing: ALTER TABLE ps_psgdpr_log CHANGE id_gdpr_log id_gdpr_log INT AUTO_INCREMENT NOT NULL, CHANGE id_customer id_customer INT NOT NULL, CHANGE id_guest id_guest INT NOT NULL, CHANGE client_name client_name VARCHAR(255) NOT NULL, CHANGE id_module id_module INT NOT NULL
Executing: ALTER TABLE ps_psgdpr_consent MODIFY id_gdpr_consent INT UNSIGNED NOT NULL
Executing: ALTER TABLE ps_psgdpr_consent DROP PRIMARY KEY
Executing: ALTER TABLE ps_psgdpr_consent CHANGE id_gdpr_consent id_gdpr_consent INT AUTO_INCREMENT NOT NULL, CHANGE id_module id_module INT NOT NULL, CHANGE active active TINYINT(1) NOT NULL, CHANGE error error TINYINT(1) NOT NULL, CHANGE error_message error_message VARCHAR(255) NOT NULL
15:36:51 CRITICAL [console] Error thrown while running command "prestashop:schema:update-without-foreign --env=prod". Message: "An exception occurred while executing 'ALTER TABLE ps_psgdpr_consent CHANGE id_gdpr_consent id_gdpr_consent INT AUTO_INCREMENT NOT NULL, CHANGE id_module id_module INT NOT NULL, CHANGE active active TINYINT(1) NOT NULL, CHANGE error error TINYINT(1) NOT NULL, CHANGE error_message error_message VARCHAR(255) NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key" ["exception" => Doctrine\DBAL\Exception\DriverException { …},"command" => "prestashop:schema:update-without-foreign --env=prod","message" => """ An exception occurred while executing 'ALTER TABLE ps_psgdpr_consent CHANGE id_gdpr_consent id_gdpr_consent INT AUTO_INCREMENT NOT NULL, CHANGE id_module id_module INT NOT NULL, CHANGE active active TINYINT(1) NOT NULL, CHANGE error error TINYINT(1) NOT NULL, CHANGE error_message error_message VARCHAR(255) NOT NULL':\n \n SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key """]
In AbstractMySQLDriver.php line 128:
An exception occurred while executing 'ALTER TABLE ps_psgdpr_consent CHANGE
id_gdpr_consent id_gdpr_consent INT AUTO_INCREMENT NOT NULL, CHANGE id_mod
ule id_module INT NOT NULL, CHANGE active active TINYINT(1) NOT NULL, CHANG
E error error TINYINT(1) NOT NULL, CHANGE error_message error_message VARCH
AR(255) NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table def
inition; there can be only one auto column and it must be defined as a key
In Exception.php line 18:
SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table def
inition; there can be only one auto column and it must be defined as a key
In PDOConnection.php line 141:
SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table def
inition; there can be only one auto column and it must be defined as a key
prestashop:schema:update-without-foreign [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--id_shop [ID_SHOP]] [--id_shop_group [ID_SHOP_GROUP]] [--]

Errors:
Error during database upgrade. You may need to restore your database.
Error upgrading Doctrine schema

@SerenaButler
Copy link

Same here:

Executing: ALTER TABLE ps_psgdpr_consent CHANGE id_gdpr_consent id_gdpr_consent INT AUTO_INCREMENT NOT NULL, CHANGE id_module id_module INT NOT NULL, CHANGE active active TINYINT(1) NOT NULL, CHANGE error error TINYINT(1) NOT NULL, CHANGE error_message error_message VARCHAR(255) NOT NULL
15:16:04 CRITICAL [console] Error thrown while running command "prestashop:schema:update-without-foreign --env=prod". Message: "There is no active transaction" ["exception" => PDOException { …},"command" => "prestashop:schema:update-without-foreign --env=prod","message" => "There is no active transaction"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.1.x Branch Autoupgrade Module: autoupgrade BO Category: Back Office Bug Type: Bug Database Label: Which BO under menu is concerned GDPR Module: psgdpr Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Module Module Verified The issue has been reproduced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants