Last active
December 3, 2023 05:30
-
-
Save JeroenDeDauw/c86a5ab7e2771301eb506b246f1af7a6 to your computer and use it in GitHub Desktop.
Rebuilding Wikibase ID counters, see https://wikibase.consulting/transferring-wikibase-data-between-wikis/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- By Jeroen De Dauw / https://Professional.Wiki | |
-- License: GPL-2.0-or-later | |
SELECT * FROM /*_*/wb_id_counters; | |
REPLACE INTO /*_*/wb_id_counters VALUE((SELECT COALESCE(MAX(CAST(SUBSTRING(`page_title`, 2) AS UNSIGNED)), 0) FROM `page` WHERE `page_namespace` = 120), 'wikibase-item'); | |
REPLACE INTO /*_*/wb_id_counters VALUE((SELECT COALESCE(MAX(CAST(SUBSTRING(`page_title`, 2) AS UNSIGNED)), 0) FROM `page` WHERE `page_namespace` = 122), 'wikibase-property'); | |
SELECT * FROM /*_*/wb_id_counters; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you available for some troubleshooting?
We at WikiTide tries to ran the script but it fails and give us this: