coren has submitted this change and it was merged.

Change subject: Labs DB: views for archive table
......................................................................


Labs DB: views for archive table

Including archive_userindex to preserve the index on users.

Change-Id: Ia7389d62b714ed7cca95f25cbc8ab5bcd20c4396
---
M maintain-replicas/maintain-replicas.pl
1 file changed, 26 insertions(+), 2 deletions(-)

Approvals:
  coren: Verified; Looks good to me, approved
  Springle: Looks good to me, but someone else must approve



diff --git a/maintain-replicas/maintain-replicas.pl 
b/maintain-replicas/maintain-replicas.pl
index 6187e7e..242001d 100755
--- a/maintain-replicas/maintain-replicas.pl
+++ b/maintain-replicas/maintain-replicas.pl
@@ -122,6 +122,30 @@
                     af_is_unrequested, af_is_featured, af_is_unfeatured, 
af_is_resolved,
                     af_is_unresolved, af_relevance_score, af_relevance_sort, 
af_last_status_notes', },
 
+    'archive' => {
+        'source' => 'archive',
+        'view' => 'select ar_id, ar_namespace, ar_title, NULL as ar_text,
+                    NULL as ar_comment,
+                    if(ar_deleted&4,null,ar_user) as ar_user,
+                    if(ar_deleted&4,null,ar_user_text) as ar_user_text,
+                    ar_timestamp, ar_minor_edit, ar_flags, ar_rev_id,
+                    if(ar_deleted&1,null,ar_text_id) as ar_text_id,
+                    ar_deleted, if(ar_deleted&1,null,ar_len) as ar_len,
+                    ar_page_id, ar_parent_id,
+                    if(ar_deleted&1,null,ar_sha1) as ar_sha1' },
+
+    'archive_userindex' => {
+        'source' => 'archive',
+        'view' => 'select ar_id, ar_namespace, ar_title, NULL as ar_text,
+                    NULL as ar_comment,
+                    ar_user, ar_user_text,
+                    ar_timestamp, ar_minor_edit, ar_flags, ar_rev_id,
+                    if(ar_deleted&1,null,ar_text_id) as ar_text_id,
+                    ar_deleted, if(ar_deleted&1,null,ar_len) as ar_len,
+                    ar_page_id, ar_parent_id,
+                    if(ar_deleted&1,null,ar_sha1) as ar_sha1',
+        'where' => '(ar_deleted&1)==0' },
+
     'globaluser' => {
         'source' => 'globaluser',
         'view' => 'select gu_id, gu_name, gu_enabled, gu_enabled_method, 
gu_home_db,
@@ -198,7 +222,7 @@
                     if(oi_deleted&2,null,oi_description) as oi_description,
                     oi_user, oi_user_text, oi_timestamp, oi_metadata, 
oi_media_type,
                     oi_major_mime, oi_minor_mime, oi_deleted, oi_sha1',
-        'where' => '(oi_deleted&4)==0' },
+        'where' => '(oi_deleted&4)=0' },
 
     'recentchanges' => {
         'source' => 'recentchanges',
@@ -215,7 +239,7 @@
                     if(rc_deleted&2,null,rc_comment) as rc_comment, rc_minor, 
rc_bot, rc_new, rc_cur_id,
                     rc_this_oldid, rc_last_oldid, rc_type, rc_patrolled, null 
as rc_ip, rc_old_len,
                     rc_new_len, rc_deleted, rc_logid, rc_log_type, 
rc_log_action, rc_params',
-        'where' => '(rc_deleted&4)==0' },
+        'where' => '(rc_deleted&4)=0' },
 
     'revision' => {
         'source' => 'revision',

-- 
To view, visit https://gerrit.wikimedia.org/r/97557
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7389d62b714ed7cca95f25cbc8ab5bcd20c4396
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: coren <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: coren <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to