diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-03-05.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-03-05.sql index 8283d5d2772f6..dbae8b67ed550 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-03-05.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-03-05.sql @@ -20,8 +20,8 @@ INSERT INTO `#__extensions` (`name`, `type`, `element`, `folder`, `client_id`, ` ('cassiopeia', 'template', 'cassiopeia', '', 0, 1, 1, 0, '{}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); INSERT INTO `#__template_styles` (`template`, `client_id`, `home`, `title`, `params`) VALUES -('atum', 1, (CASE WHEN (SELECT count FROM (SELECT count(`id`) AS count FROM `#__template_styles` WHERE home = '1' AND client_id = 1 AND `template` IN ('isis', 'hathor')) as c) = 0 THEN '0' ELSE '1' END), 'atum - Default', '{}'), -('cassiopeia', 0, (CASE WHEN (SELECT count FROM (SELECT count(`id`) AS count FROM `#__template_styles` WHERE home = '1' AND client_id = 0 AND `template` IN ('protostar', 'beez3')) as c) = 0 THEN '0' ELSE '1' END), 'cassiopeia - Default', '{}'); +('atum', 1, (CASE WHEN (SELECT b.`count` FROM (SELECT count(a.`id`) AS `count` FROM `#__template_styles` a WHERE a.`home` = '1' AND a.`client_id` = 1 AND a.`template` IN ('isis', 'hathor')) AS b) = 0 THEN '0' ELSE '1' END), 'atum - Default', '{}'), +('cassiopeia', 0, (CASE WHEN (SELECT d.`count` FROM (SELECT count(c.`id`) AS `count` FROM `#__template_styles` c WHERE c.`home` = '1' AND c.`client_id` = 0 AND c.`template` IN ('protostar', 'beez3')) AS d) = 0 THEN '0' ELSE '1' END), 'cassiopeia - Default', '{}'); -- -- Move mod_version to the right position for the atum template diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-03-05.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-03-05.sql index 817cb62c9fafd..d6620523b6612 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-03-05.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-03-05.sql @@ -20,8 +20,8 @@ INSERT INTO "#__extensions" ("name", "type", "element", "folder", "client_id", " ('cassiopeia', 'template', 'cassiopeia', '', 0, 1, 1, 0, '{}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); INSERT INTO "#__template_styles" ("template", "client_id", "home", "title", "params") VALUES -('atum', 1, (CASE WHEN (SELECT count FROM (SELECT count("id") AS count FROM "#__template_styles" WHERE home = '1' AND client_id = 1 AND "template" IN ('isis', 'hathor')) as c) = 0 THEN '0' ELSE '1' END), 'atum - Default', '{}'), -('cassiopeia', 0, (CASE WHEN (SELECT count FROM (SELECT count("id") AS count FROM "#__template_styles" WHERE home = '1' AND client_id = 0 AND "template" IN ('protostar', 'beez3')) as c) = 0 THEN '0' ELSE '1' END), 'cassiopeia - Default', '{}'); +('atum', 1, (CASE WHEN (SELECT b."count" FROM (SELECT count(a."id") AS "count" FROM "#__template_styles" a WHERE a."home" = '1' AND a."client_id" = 1 AND a."template" IN ('isis', 'hathor')) AS b) = 0 THEN '0' ELSE '1' END), 'atum - Default', '{}'), +('cassiopeia', 0, (CASE WHEN (SELECT d."count" FROM (SELECT count(c."id") AS "count" FROM "#__template_styles" c WHERE c."home" = '1' AND c."client_id" = 0 AND c."template" IN ('protostar', 'beez3')) AS d) = 0 THEN '0' ELSE '1' END), 'cassiopeia - Default', '{}'); -- -- Move mod_version to the right position for the atum template