diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.10-2019-07-09.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.10-2019-07-09.sql new file mode 100644 index 0000000000000..3738ee367d0ac --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.9.10-2019-07-09.sql @@ -0,0 +1 @@ +ALTER TABLE `#__template_styles` MODIFY `home` char(7) NOT NULL DEFAULT '0'; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.8-2019-06-15.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.8-2019-06-15.sql index 9d8a7a5b0dd50..33df450aa00ca 100644 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.8-2019-06-15.sql +++ b/administrator/components/com_admin/sql/updates/mysql/3.9.8-2019-06-15.sql @@ -1,4 +1,4 @@ ALTER TABLE `#__template_styles` DROP INDEX `idx_home`; -ALTER TABLE `#__template_styles` MODIFY `home` tinyint(1) unsigned NOT NULL DEFAULT 0; +# Query removed, see https://github.com/joomla/joomla-cms/pull/25484 ALTER TABLE `#__template_styles` ADD INDEX `idx_client_id` (`client_id`); ALTER TABLE `#__template_styles` ADD INDEX `idx_client_id_home` (`client_id`, `home`); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.10-2019-07-09.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.10-2019-07-09.sql new file mode 100644 index 0000000000000..b1a394cd5c582 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.9.10-2019-07-09.sql @@ -0,0 +1,2 @@ +ALTER TABLE "#__template_styles" ALTER COLUMN "home" TYPE character varying(7); +ALTER TABLE "#__template_styles" ALTER COLUMN "home" SET DEFAULT '0'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.8-2019-06-15.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.8-2019-06-15.sql index a950b8f8d7cb9..3acf06149c527 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.8-2019-06-15.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.9.8-2019-06-15.sql @@ -1,5 +1,4 @@ DROP INDEX IF EXISTS "#__template_styles_idx_home"; -ALTER TABLE "#__template_styles" ALTER COLUMN "home" TYPE smallint; -ALTER TABLE "#__template_styles" ALTER COLUMN "home" SET DEFAULT 0; +# Queries removed, see https://github.com/joomla/joomla-cms/pull/25484 CREATE INDEX "#__template_styles_idx_client_id" ON "#__template_styles" ("client_id"); CREATE INDEX "#__template_styles_idx_client_id_home" ON "#__template_styles" ("client_id", "home"); diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.9.10-2019-07-09.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.9.10-2019-07-09.sql new file mode 100644 index 0000000000000..af8f28708f799 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.9.10-2019-07-09.sql @@ -0,0 +1,2 @@ +ALTER TABLE [#__template_styles] ALTER COLUMN [home] nvarchar(7) NOT NULL; +ALTER TABLE [#__template_styles] ADD DEFAULT ('0') FOR [home]; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.9.8-2019-06-15.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.9.8-2019-06-15.sql index ff23741fc4b20..67aef81054044 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.9.8-2019-06-15.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.9.8-2019-06-15.sql @@ -1,5 +1,5 @@ DROP INDEX [idx_home] ON [#__template_styles]; -ALTER TABLE [#__template_styles] ALTER COLUMN [home] [tyinint] NOT NULL; +# Query removed, see https://github.com/joomla/joomla-cms/pull/25484 CREATE NONCLUSTERED INDEX [idx_client_id] ON [#__template_styles] ( [client_id] ASC diff --git a/installation/sql/mysql/joomla.sql b/installation/sql/mysql/joomla.sql index 406153cdae89f..671125ab3b806 100644 --- a/installation/sql/mysql/joomla.sql +++ b/installation/sql/mysql/joomla.sql @@ -1831,7 +1831,7 @@ CREATE TABLE IF NOT EXISTS `#__template_styles` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `template` varchar(50) NOT NULL DEFAULT '', `client_id` tinyint(1) unsigned NOT NULL DEFAULT 0, - `home` tinyint(1) unsigned NOT NULL DEFAULT 0, + `home` char(7) NOT NULL DEFAULT '0', `title` varchar(255) NOT NULL DEFAULT '', `params` text NOT NULL, PRIMARY KEY (`id`), @@ -1845,10 +1845,10 @@ CREATE TABLE IF NOT EXISTS `#__template_styles` ( -- INSERT INTO `#__template_styles` (`id`, `template`, `client_id`, `home`, `title`, `params`) VALUES -(4, 'beez3', 0, 0, 'Beez3 - Default', '{"wrapperSmall":"53","wrapperLarge":"72","logo":"images\\/joomla_black.png","sitetitle":"Joomla!","sitedescription":"Open Source Content Management","navposition":"left","templatecolor":"personal","html5":"0"}'), -(5, 'hathor', 1, 0, 'Hathor - Default', '{"showSiteName":"0","colourChoice":"","boldText":"0"}'), -(7, 'protostar', 0, 1, 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'), -(8, 'isis', 1, 1, 'isis - Default', '{"templateColor":"","logoFile":""}'); +(4, 'beez3', 0, '0', 'Beez3 - Default', '{"wrapperSmall":"53","wrapperLarge":"72","logo":"images\\/joomla_black.png","sitetitle":"Joomla!","sitedescription":"Open Source Content Management","navposition":"left","templatecolor":"personal","html5":"0"}'), +(5, 'hathor', 1, '0', 'Hathor - Default', '{"showSiteName":"0","colourChoice":"","boldText":"0"}'), +(7, 'protostar', 0, '1', 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'), +(8, 'isis', 1, '1', 'isis - Default', '{"templateColor":"","logoFile":""}'); -- -------------------------------------------------------- diff --git a/installation/sql/postgresql/joomla.sql b/installation/sql/postgresql/joomla.sql index bc5f452561fdb..77cebdbebafcb 100644 --- a/installation/sql/postgresql/joomla.sql +++ b/installation/sql/postgresql/joomla.sql @@ -1801,7 +1801,7 @@ CREATE TABLE "#__template_styles" ( "id" serial NOT NULL, "template" varchar(50) DEFAULT '' NOT NULL, "client_id" smallint DEFAULT 0 NOT NULL, - "home" smallint DEFAULT 0 NOT NULL, + "home" varchar(7) DEFAULT '0' NOT NULL, "title" varchar(255) DEFAULT '' NOT NULL, "params" text NOT NULL, PRIMARY KEY ("id") @@ -1815,10 +1815,10 @@ CREATE INDEX "#__template_styles_idx_client_id_home" ON "#__template_styles" ("c -- INSERT INTO "#__template_styles" ("id", "template", "client_id", "home", "title", "params") VALUES -(4, 'beez3', 0, 0, 'Beez3 - Default', '{"wrapperSmall":"53","wrapperLarge":"72","logo":"images\\/joomla_black.png","sitetitle":"Joomla!","sitedescription":"Open Source Content Management","navposition":"left","templatecolor":"personal","html5":"0"}'), -(5, 'hathor', 1, 0, 'Hathor - Default', '{"showSiteName":"0","colourChoice":"","boldText":"0"}'), -(7, 'protostar', 0, 1, 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'), -(8, 'isis', 1, 1, 'isis - Default', '{"templateColor":"","logoFile":""}'); +(4, 'beez3', 0, '0', 'Beez3 - Default', '{"wrapperSmall":"53","wrapperLarge":"72","logo":"images\\/joomla_black.png","sitetitle":"Joomla!","sitedescription":"Open Source Content Management","navposition":"left","templatecolor":"personal","html5":"0"}'), +(5, 'hathor', 1, '0', 'Hathor - Default', '{"showSiteName":"0","colourChoice":"","boldText":"0"}'), +(7, 'protostar', 0, '1', 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'), +(8, 'isis', 1, '1', 'isis - Default', '{"templateColor":"","logoFile":""}'); SELECT setval('#__template_styles_id_seq', 9, false); diff --git a/installation/sql/sqlazure/joomla.sql b/installation/sql/sqlazure/joomla.sql index ffe99a6121bba..d043a01b80aab 100644 --- a/installation/sql/sqlazure/joomla.sql +++ b/installation/sql/sqlazure/joomla.sql @@ -2575,7 +2575,7 @@ CREATE TABLE "#__template_styles" ( "id" bigint IDENTITY(9,1) NOT NULL, "template" nvarchar(50) NOT NULL DEFAULT '', "client_id" tinyint NOT NULL DEFAULT 0, - "home" tinyint NOT NULL DEFAULT 0, + "home" nvarchar(7) NOT NULL DEFAULT '0', "title" nvarchar(255) NOT NULL DEFAULT '', "params" nvarchar(max) NOT NULL, CONSTRAINT "PK_#__template_styles_id" PRIMARY KEY CLUSTERED @@ -2607,10 +2607,10 @@ CREATE NONCLUSTERED INDEX "idx_client_id_home" ON "#__template_styles" SET IDENTITY_INSERT "#__template_styles" ON; INSERT INTO "#__template_styles" ("id", "template", "client_id", "home", "title", "params") VALUES -(4, 'beez3', 0, 0, 'Beez3 - Default', '{"wrapperSmall":"53","wrapperLarge":"72","logo":"images/joomla_black.png","sitetitle":"Joomla!","sitedescription":"Open Source Content Management","navposition":"left","templatecolor":"personal","html5":"0"}'), -(5, 'hathor', 1, 0, 'Hathor - Default', '{"showSiteName":"0","colourChoice":"","boldText":"0"}'), -(7, 'protostar', 0, 1, 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'), -(8, 'isis', 1, 1, 'isis - Default', '{"templateColor":"","logoFile":""}'); +(4, 'beez3', 0, '0', 'Beez3 - Default', '{"wrapperSmall":"53","wrapperLarge":"72","logo":"images/joomla_black.png","sitetitle":"Joomla!","sitedescription":"Open Source Content Management","navposition":"left","templatecolor":"personal","html5":"0"}'), +(5, 'hathor', 1, '0', 'Hathor - Default', '{"showSiteName":"0","colourChoice":"","boldText":"0"}'), +(7, 'protostar', 0, '1', 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'), +(8, 'isis', 1, '1', 'isis - Default', '{"templateColor":"","logoFile":""}'); SET IDENTITY_INSERT "#__template_styles" OFF;