From 97b4ef3b3e1a784b8f18055466df54a1ce4b6170 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Mon, 2 Sep 2024 20:00:54 -0400 Subject: [PATCH] Modified SQL with INSERT INTO SELECT FROM --- .../com_admin/sql/updates/mysql/5.2.0-2024-08-22.sql | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_admin/sql/updates/mysql/5.2.0-2024-08-22.sql b/administrator/components/com_admin/sql/updates/mysql/5.2.0-2024-08-22.sql index 51a0c8c0a48a6..0876fa5024ede 100644 --- a/administrator/components/com_admin/sql/updates/mysql/5.2.0-2024-08-22.sql +++ b/administrator/components/com_admin/sql/updates/mysql/5.2.0-2024-08-22.sql @@ -1,3 +1,6 @@ -INSERT INTO `#__guidedtour_steps` (`title`, `description`, `position`, `target`, `type`, `interactive_type`, `url`, `published`, `language`, `note`, `params`, `tour_id`, `created`, `created_by`, `modified`, `modified_by`) VALUES ('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_DESCRIPTION', 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', 1, '*', '', '"{\"required\":1,\"requiredvalue\":\"\"}"', 0, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0); -INSERT INTO `#__guidedtours` (`title`, `description`, `extensions`, `url`, `published`, `language`, `note`, `access`, `uid`, `autostart`, `created`, `created_by`, `modified`, `modified_by`) VALUES ('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_DESCRIPTION', '["com_cpanel"]', 'administrator/index.php', 1, '*', '', 1, 'joomla-whatsnew-5-2', 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0); -UPDATE `#__guidedtour_steps` SET `tour_id` = LAST_INSERT_ID() WHERE `tour_id`=0; +INSERT INTO `#__guidedtours` (`title`, `description`, `extensions`, `url`, `published`, `language`, `note`, `access`, `uid`, `autostart`, `created`, `created_by`, `modified`, `modified_by`) VALUES +('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_DESCRIPTION', '["com_cpanel"]', 'administrator/index.php', 1, '*', '', 1, 'joomla-whatsnew-5-2', 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0); +INSERT INTO `#__guidedtour_steps` (`title`, `description`, `position`, `target`, `type`, `interactive_type`, `url`, `published`, `language`, `note`, `params`, `tour_id`, `created`, `created_by`, `modified`, `modified_by`) +SELECT 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_DESCRIPTION', 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', 1, '*', '', '{"required":1,"requiredvalue":""}', MAX(`id`), CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0 + FROM `#__guidedtours` + WHERE `uid` = 'joomla-whatsnew-5-2';