CoreFiles by mySites.guru
4.0.0-2020-05-21.sql14 lines, 818 bytes, from Joomla_4.0.0-beta6-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta5
md5
0338e9b6610514e1c88f9fe0665b0682
sha1
959f29b33b32eeabffd102d1c323aefe6886f924
sha256
a3b42d80999819b4d03a0c6984150de142b7ad2938ad2b22cb67be9b145410e3
-- Renaming table
ALTER TABLE "#__ucm_history" RENAME TO "#__history";
-- Rename ucm_item_id to item_id as the new primary identifier for the original content item
ALTER TABLE "#__history" RENAME "ucm_item_id" TO "item_id";
ALTER TABLE "#__history" ALTER COLUMN "item_id" TYPE character varying(50);
ALTER TABLE "#__history" ALTER COLUMN "item_id" SET NOT NULL;
ALTER TABLE "#__history" ALTER COLUMN "item_id" DROP DEFAULT;

-- Extend the original field content with the alias of the content type
UPDATE "#__history" AS h SET "item_id" = CONCAT(c."type_alias", '.', "item_id") FROM "#__content_types" AS c WHERE h."ucm_type_id" = c."type_id";

-- Now we don't need the ucm_type_id anymore and drop it.
ALTER TABLE "#__history" DROP COLUMN "ucm_type_id";
ALTER TABLE "#__history" ALTER COLUMN "save_date" DROP DEFAULT;

The same content is in 7 releases, Joomla 4.0.0-beta to 4.0.0-beta7. See them all, or every version of this file.