Jump to content

Recommended Posts

Hi,

Yesterday I tried to update my prestashop 1.6.1.19 to 1.7.5.0. I did not succeed.

I used the 1-Click Upgrade module.

All checklist was green.

Version comparison:

PrestaShop Original version:
warning.gif 171 file modifications have been detected, including 101 from core and native modules:

Differences between versions:
warning.gif 1761 files will be modified, 1420 files will be deleted (if they are found).

I could start the upgrade.

But at the very end of the upgrade this error occurred: "error updating doctrine schema" and I had to rollback.

 

THE WHOLE ERROR LOG:

[WARNING] SQL 1.7.5.0 1060 in ALTER TABLE `ps_stock_available` ADD `location` VARCHAR(255) NOT NULL DEFAULT '' AFTER `out_of_stock`: Duplicate column name 'location'

Updating database schema...

Executing: CREATE TABLE ps_module_history (id INT AUTO_INCREMENT NOT NULL, id_employee INT NOT NULL, id_module INT NOT NULL, date_add DATETIME NOT NULL, date_upd DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB

Executing: CREATE TABLE ps_admin_filter (id INT AUTO_INCREMENT NOT NULL, employee INT NOT NULL, shop INT NOT NULL, controller VARCHAR(60) NOT NULL, action VARCHAR(100) NOT NULL, filter LONGTEXT NOT NULL, UNIQUE INDEX admin_filter_search_idx (employee, shop, controller, action), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB

Executing: CREATE TABLE ps_translation (id_translation INT AUTO_INCREMENT NOT NULL, id_lang INT NOT NULL, `key` TEXT NOT NULL, translation TEXT NOT NULL, domain VARCHAR(80) NOT NULL, theme VARCHAR(32) DEFAULT NULL, INDEX IDX_ADEBEB36BA299860 (id_lang), INDEX `key` (domain), PRIMARY KEY(id_translation)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB

Executing: DROP INDEX id_lang ON ps_attribute_lang

Executing: CREATE INDEX IDX_3ABE46A77A4F53DC ON ps_attribute_lang (id_attribute)

Executing: CREATE INDEX IDX_3ABE46A7BA299860 ON ps_attribute_lang (id_lang)

Executing: DROP INDEX lang_iso_code ON ps_lang

Executing: ALTER TABLE ps_lang CHANGE active active TINYINT(1) NOT NULL DEFAULT '0' , CHANGE iso_code iso_code VARCHAR(2) NOT NULL, CHANGE language_code language_code VARCHAR(5) NOT NULL, CHANGE date_format_lite date_format_lite VARCHAR(32) NOT NULL DEFAULT 'Y-m-d' , CHANGE date_format_full date_format_full VARCHAR(32) NOT NULL DEFAULT 'Y-m-d H:i:s' , CHANGE is_rtl is_rtl TINYINT(1) NOT NULL DEFAULT '0'

Executing: CREATE INDEX IDX_2F43BFC7BA299860 ON ps_lang_shop (id_lang)

Executing: DROP INDEX id_shop ON ps_lang_shop

Executing: CREATE INDEX IDX_2F43BFC7274A50A0 ON ps_lang_shop (id_shop)

Executing: ALTER TABLE ps_attribute_group CHANGE is_color_group is_color_group TINYINT(1) NOT NULL DEFAULT '0' , CHANGE group_type group_type VARCHAR(255) NOT NULL DEFAULT 'select' , CHANGE position position INT NOT NULL DEFAULT '0'

Executing: CREATE INDEX IDX_DB30BAAC67A664FB ON ps_attribute_group_shop (id_attribute_group)

Executing: DROP INDEX id_shop ON ps_attribute_group_shop

Executing: CREATE INDEX IDX_DB30BAAC274A50A0 ON ps_attribute_group_shop (id_shop)

Executing: CREATE INDEX IDX_4653726C67A664FB ON ps_attribute_group_lang (id_attribute_group)

Executing: CREATE INDEX IDX_4653726CBA299860 ON ps_attribute_group_lang (id_lang)

Executing: ALTER TABLE ps_tab_lang CHANGE name name VARCHAR(128) NOT NULL

Executing: CREATE INDEX IDX_CFD9262DED47AB56 ON ps_tab_lang (id_tab)

Executing: CREATE INDEX IDX_CFD9262DBA299860 ON ps_tab_lang (id_lang)

Executing: DROP INDEX class_name ON ps_tab

Executing: DROP INDEX id_parent ON ps_tab

Executing: ALTER TABLE ps_tab CHANGE class_name class_name VARCHAR(64) DEFAULT NULL, CHANGE position position INT NOT NULL, CHANGE active active TINYINT(1) NOT NULL DEFAULT '1' , CHANGE hide_host_mode hide_host_mode TINYINT(1) NOT NULL DEFAULT '0' , CHANGE icon icon VARCHAR(32) DEFAULT ''

Executing: DROP INDEX id_category ON ps_shop

Executing: DROP INDEX id_shop_group ON ps_shop

Executing: ALTER TABLE ps_shop CHANGE id_category id_category INT NOT NULL DEFAULT '1' , CHANGE theme_name theme_name VARCHAR(255) NOT NULL, CHANGE active active TINYINT(1) NOT NULL DEFAULT '1' , CHANGE deleted deleted TINYINT(1) NOT NULL DEFAULT '0'

Executing: CREATE INDEX IDX_CBDFBB9EF5C9E40 ON ps_shop (id_shop_group)

Executing: DROP INDEX deleted ON ps_shop_group

Executing: ALTER TABLE ps_shop_group CHANGE active active TINYINT(1) NOT NULL DEFAULT '1' , CHANGE deleted deleted TINYINT(1) NOT NULL DEFAULT '0'

Executing: ALTER TABLE ps_attribute CHANGE color color VARCHAR(32) NOT NULL, CHANGE position position INT NOT NULL DEFAULT '0'

04:02:07 ERROR [console] Error thrown while running command "prestashop:schema:update-without-foreign". Message: "An exception occurred while executing 'ALTER TABLE ps_attribute CHANGE color color VARCHAR(32) NOT NULL, CHANGE position position INT NOT NULL DEFAULT '0' ':

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 1" ["exception" => Doctrine\DBAL\Exception\DriverException { …},"command" => "prestashop:schema:update-without-foreign","message" => """ An exception occurred while executing 'ALTER TABLE ps_attribute CHANGE color color VARCHAR(32) NOT NULL, CHANGE position position INT NOT NULL DEFAULT '0' ':\n \n SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 1 """]

In AbstractMySQLDriver.php line 115:

An exception occurred while executing 'ALTER TABLE ps_attribute CHANGE colo

r color VARCHAR(32) NOT NULL, CHANGE position position INT NOT NULL DEFAULT

'0' ':

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 1

In PDOConnection.php line 106:

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 1

In PDOConnection.php line 104:

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 1

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]] [--]

 

Before I did the rollback I just visited my https://shop.borntotrick.com to check how it looks like. Only a blank page appeared, same when I wanted to access the admin page.

So I enabled the debuger mode and this is what occurred:debugger-mod-after-upgrade-1.6.1.19-to-1.7.5.0.thumb.jpg.94a98d510cc7e5ed41f179d9b25bc186.jpg

I tried the whole process one more time with PS cleaning  "Functional integrity constraints - Check and Fix" and "Database cleaning - Clean and Optimize" with PS cleaner module before the upgrade but it did not solve my problem.

Do you have any solution for this?

 

Edited by MichalMarcek (see edit history)
Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...