jenkins-bot has submitted this change and it was merged.
Change subject: Make patch-reference_wiki*.sql work with prefixed tables
......................................................................
Make patch-reference_wiki*.sql work with prefixed tables
Bug: T121486
Change-Id: I88a73e2a77b6a3feece45222ef85de045938126c
---
M db_patches/patch-reference_wiki-phase3.sql
M db_patches/patch-reference_wiki.sql
2 files changed, 16 insertions(+), 16 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/db_patches/patch-reference_wiki-phase3.sql
b/db_patches/patch-reference_wiki-phase3.sql
index b511721..eb8b1aa 100644
--- a/db_patches/patch-reference_wiki-phase3.sql
+++ b/db_patches/patch-reference_wiki-phase3.sql
@@ -10,12 +10,12 @@
SELECT ref_src_workflow_id, workflow_wiki
FROM /*_*/flow_wiki_ref, /*_*/flow_workflow
WHERE
- flow_wiki_ref.ref_src_workflow_id =
flow_workflow.workflow_id AND
- ( flow_wiki_ref.ref_src_wiki = '' OR
flow_wiki_ref.ref_src_wiki IS NULL )
+ ref_src_workflow_id = workflow_id AND
+ ( ref_src_wiki = '' OR ref_src_wiki IS NULL )
LIMIT 1000
) tmp
- SET flow_wiki_ref.ref_src_wiki = tmp.workflow_wiki
- WHERE flow_wiki_ref.ref_src_workflow_id = tmp.ref_src_workflow_id;
+ SET /*_*/flow_wiki_ref.ref_src_wiki = tmp.workflow_wiki
+ WHERE /*_*/flow_wiki_ref.ref_src_workflow_id = tmp.ref_src_workflow_id;
-- Populate external references with the appropriate wiki.
@@ -24,9 +24,9 @@
SELECT ref_src_workflow_id, workflow_wiki
FROM /*_*/flow_ext_ref, /*_*/flow_workflow
WHERE
- flow_ext_ref.ref_src_workflow_id =
flow_workflow.workflow_id AND
- ( flow_ext_ref.ref_src_wiki = '' OR
flow_ext_ref.ref_src_wiki IS NULL )
+ ref_src_workflow_id = workflow_id AND
+ ( ref_src_wiki = '' OR ref_src_wiki IS NULL )
LIMIT 1000
) tmp
- SET flow_ext_ref.ref_src_wiki = tmp.workflow_wiki
- WHERE flow_ext_ref.ref_src_workflow_id = tmp.ref_src_workflow_id;
+ SET /*_*/flow_ext_ref.ref_src_wiki = tmp.workflow_wiki
+ WHERE /*_*/flow_ext_ref.ref_src_workflow_id = tmp.ref_src_workflow_id;
diff --git a/db_patches/patch-reference_wiki.sql
b/db_patches/patch-reference_wiki.sql
index 63b7778..2c479a1 100644
--- a/db_patches/patch-reference_wiki.sql
+++ b/db_patches/patch-reference_wiki.sql
@@ -5,14 +5,14 @@
ALTER TABLE /*_*/flow_wiki_ref ADD COLUMN ref_src_wiki varchar(16) binary not
null;
-- Drop indexes for adjustment
-DROP INDEX /*i*/flow_wiki_ref_idx ON /*_*/flow_wiki_ref;
-DROP INDEX /*i*/flow_wiki_ref_revision ON /*_*/flow_wiki_ref;
+DROP INDEX IF EXISTS /*i*/flow_wiki_ref_idx ON /*_*/flow_wiki_ref;
+DROP INDEX IF EXISTS /*i*/flow_wiki_ref_revision ON /*_*/flow_wiki_ref;
-- Populate wiki references with the appropriate wiki
UPDATE /*_*/flow_wiki_ref, /*_*/flow_workflow
- SET flow_wiki_ref.ref_src_wiki = flow_workflow.workflow_wiki
+ SET ref_src_wiki = workflow_wiki
WHERE
- flow_wiki_ref.ref_src_workflow_id = flow_workflow.workflow_id;
+ ref_src_workflow_id = workflow_id;
-- Recreate new indexes
CREATE INDEX /*i*/flow_wiki_ref_idx_v2 ON /*_*/flow_wiki_ref
@@ -25,14 +25,14 @@
ALTER TABLE /*_*/flow_ext_ref ADD COLUMN ref_src_wiki varchar(16) binary not
null;
-- Drop indexes
-DROP INDEX /*i*/flow_ext_ref_idx ON /*_*/flow_ext_ref;
-DROP INDEX /*i*/flow_ext_ref_revision ON /*_*/flow_ext_ref;
+DROP INDEX IF EXISTS /*i*/flow_ext_ref_idx ON /*_*/flow_ext_ref;
+DROP INDEX IF EXISTS /*i*/flow_ext_ref_revision ON /*_*/flow_ext_ref;
-- Populate external references with the appropriate wiki
UPDATE /*_*/flow_ext_ref, /*_*/flow_workflow
- SET flow_ext_ref.ref_src_wiki = flow_workflow.workflow_wiki
+ SET ref_src_wiki = workflow_wiki
WHERE
- flow_ext_ref.ref_src_workflow_id = flow_workflow.workflow_id;
+ ref_src_workflow_id = workflow_id;
-- Recreate new indexes
CREATE INDEX /*i*/flow_ext_ref_idx_v2 ON /*_*/flow_ext_ref
--
To view, visit https://gerrit.wikimedia.org/r/259234
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I88a73e2a77b6a3feece45222ef85de045938126c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits