-- Sitemap definitions of a WinterCMS site with the Golem15.Sitemap plugin, -- one JSON object per line: the --definitions input of -- sitemap:import-winter. -- -- mysql -N -B --raw < winter-export-definitions.sql > sitemap-definitions.jsonl -- -- Read-only: it selects from the definitions table and changes nothing. -- JSON_OBJECT needs MySQL 5.7.8+ or MariaDB 10.2.3+. -- -- Check the table name on the server before running: -- SHOW TABLES LIKE '%sitemap_definitions'; -- This file assumes golem15_sitemap_definitions. A site still on the -- Winter.Sitemap or RainLab.Sitemap plugin uses winter_sitemap_definitions -- or rainlab_sitemap_definitions; change the FROM line to match. -- -- data is the stored item list as text; the command decodes it. A site with -- several themes exports one row per theme; pass --theme to the command to -- pick the one to copy. SELECT JSON_OBJECT( 'id', d.id, 'theme', d.theme, 'data', d.data, 'created_at', d.created_at, 'updated_at', d.updated_at ) FROM golem15_sitemap_definitions d ORDER BY d.id;