Upgrade fail #15

Closed
opened 2019-01-14 10:09:12 -06:00 by doekia · 2 comments
doekia commented 2019-01-14 10:09:12 -06:00 (Migrated from github.com)

While running the tdupdater, it raise the following error:
SQL 1.0.8 1064 in INSERT INTO ps_configuration(name, value, date_add, date_upd) SELECT 'TB_MAIL_SUBJECT_TEMPLATE', '[{shop_name}] {subject}', NOW(), NOW() WHERE ( SELECT COUNT() FROM ps_configuration WHERE name = 'TB_MAIL_SUBJECT_TEMPLATE' ) = 0: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE ( SELECT COUNT() FROM ps_configuration WHERE name = 'TB_M' at line 3

The SQL should be written:
INSERT INTO ps_configuration(name, value, date_add, date_upd)
SELECT 'TB_MAIL_SUBJECT_TEMPLATE', '[{shop_name}] {subject}', NOW(), NOW()
FROM (select 1) t
WHERE ( SELECT COUNT(*) FROM ps_configuration WHERE name = 'TB_MAIL_SUBJECT_TEMPLATE' ) = 0

While running the tdupdater, it raise the following error: SQL 1.0.8 1064 in INSERT INTO `ps_configuration`(`name`, `value`, `date_add`, `date_upd`) SELECT 'TB_MAIL_SUBJECT_TEMPLATE', '[{shop_name}] {subject}', NOW(), NOW() WHERE ( SELECT COUNT(*) FROM `ps_configuration` WHERE `name` = 'TB_MAIL_SUBJECT_TEMPLATE' ) = 0: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE ( SELECT COUNT(*) FROM `ps_configuration` WHERE `name` = 'TB_M' at line 3 The SQL should be written: INSERT INTO `ps_configuration`(`name`, `value`, `date_add`, `date_upd`) SELECT 'TB_MAIL_SUBJECT_TEMPLATE', '[{shop_name}] {subject}', NOW(), NOW() FROM (select 1) t WHERE ( SELECT COUNT(*) FROM `ps_configuration` WHERE `name` = 'TB_MAIL_SUBJECT_TEMPLATE' ) = 0
Traumflug commented 2019-05-04 17:26:51 -05:00 (Migrated from github.com)

Thanks for the report. This module got replaced by module Core Updater, which does this task not with some fancy SQL, but by using class Configuration. This issue report was in mind when designing retrocompatibility in Core Updater, so it wasn't useless.

Thanks for the report. This module got replaced by module Core Updater, which does this task not with some fancy SQL, but by using class _Configuration_. This issue report was in mind when designing retrocompatibility in Core Updater, so it wasn't useless.
dvershinin commented 2019-10-09 20:08:19 -05:00 (Migrated from github.com)

@Traumflug if it was replaced by something else - make it obvious in this repository's README. There are many articles online referring to tbupdater, and not core updater. People try to use tbupdater in vain. Me for instance :)

@Traumflug if it was replaced by something else - make it obvious in this repository's README. There are many articles online referring to tbupdater, and not core updater. People try to use tbupdater in vain. Me for instance :)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-thirtybees/tbupdater#15
No description provided.