-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Prerequisites
- I understand and accept the project's code of conduct.
- I have already searched in existing issues and found no previous report of this bug.
Describe the bug and add attachments
While performing an update via 1-Click Upgrade, I'm getting an error at the end related to ps_psgdpr
Updating database schema...
Executing: ALTER TABLE ps_translation CHANGE key key TEXT NOT NULL COLLATE utf8_bin
Executing: ALTER TABLE ps_authorized_application CHANGE name name VARCHAR(50) NOT NULL
Executing: ALTER TABLE ps_feature_flag CHANGE state state TINYINT(1) DEFAULT '0', CHANGE description_wording description_wording VARCHAR(512) DEFAULT '' NOT NULL
Executing: ALTER TABLE ps_psgdpr_consent_lang MODIFY id_gdpr_consent INT UNSIGNED NOT NULL
Executing: ALTER TABLE ps_psgdpr_consent_lang DROP PRIMARY KEY
Executing: ALTER TABLE ps_psgdpr_consent_lang CHANGE id_gdpr_consent id_gdpr_consent INT NOT NULL, CHANGE id_lang id_lang INT NOT NULL, CHANGE id_shop id_shop INT NOT NULL, CHANGE message message VARCHAR(255) NOT NULL
Executing: CREATE INDEX IDX_9C2246C9BEB78BEF ON ps_psgdpr_consent_lang (id_gdpr_consent)
Executing: CREATE INDEX IDX_9C2246C9BA299860 ON ps_psgdpr_consent_lang (id_lang)
Executing: ALTER TABLE ps_psgdpr_consent_lang ADD PRIMARY KEY (id_gdpr_consent, id_lang)
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:01:56 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]] [--]
Expected behavior
To successfully upgrade the ps from 8.1.0 to 8.1.6
Steps to reproduce
Install 8.1.0 version
Make sure you have the ps_psgdpr module activated.
Perform an update through 1-Click Upgrade from 8.1.0 to 8.1.6
PrestaShop version(s) where the bug happened
8.1.0
PHP version(s) where the bug happened
7.4
If your bug is related to a module, specify its name and its version
ps_psgdpr
Your company or customer's name goes here (if applicable).
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status