[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add primary key to change_tag and tag_summary tables

2016-10-02 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add primary key to change_tag and tag_summary tables
..


Add primary key to change_tag and tag_summary tables

Based heavily on 43e386ca16411096bbbd7f14f9f4e15c5e268fe7.

Bug: T123225
Change-Id: I33480f4016812259700979f1145099744bb451d4
---
M includes/installer/MssqlUpdater.php
M includes/installer/MysqlUpdater.php
M includes/installer/OracleUpdater.php
M includes/installer/PostgresUpdater.php
M includes/installer/SqliteUpdater.php
A maintenance/archives/patch-change_tag-ct_id.sql
A maintenance/archives/patch-tag_summary-ts_id.sql
A maintenance/mssql/archives/patch-change_tag-ct_id.sql
A maintenance/mssql/archives/patch-tag_summary-ts_id.sql
M maintenance/mssql/tables.sql
A maintenance/oracle/archives/patch-change_tag-ct_id.sql
A maintenance/oracle/archives/patch-tag_summary-ts_id.sql
M maintenance/oracle/tables.sql
M maintenance/postgres/tables.sql
A maintenance/sqlite/archives/patch-change_tag-ct_id.sql
A maintenance/sqlite/archives/patch-tag_summary-ts_id.sql
M maintenance/tables.sql
17 files changed, 110 insertions(+), 4 deletions(-)

Approvals:
  Jcrespo: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/installer/MssqlUpdater.php 
b/includes/installer/MssqlUpdater.php
index 770d3bf..1175e9e 100644
--- a/includes/installer/MssqlUpdater.php
+++ b/includes/installer/MssqlUpdater.php
@@ -92,6 +92,8 @@
// 1.28
[ 'addIndex', 'recentchanges', 
'rc_name_type_patrolled_timestamp',

'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
+   [ 'addField', 'change_tag', 'ct_id', 
'patch-change_tag-ct_id.sql' ],
+   [ 'addField', 'tag_summary', 'ts_id', 
'patch-tag_summary-ts_id.sql' ],
];
}
 
diff --git a/includes/installer/MysqlUpdater.php 
b/includes/installer/MysqlUpdater.php
index 693b6ff..497f273 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -288,6 +288,8 @@

'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
[ 'doRevisionPageRevIndexNonUnique' ],
[ 'doNonUniquePlTlIl' ],
+   [ 'addField', 'change_tag', 'ct_id', 
'patch-change_tag-ct_id.sql' ],
+   [ 'addField', 'tag_summary', 'ts_id', 
'patch-tag_summary-ts_id.sql' ],
];
}
 
diff --git a/includes/installer/OracleUpdater.php 
b/includes/installer/OracleUpdater.php
index 8075aac..e1e0d0f 100644
--- a/includes/installer/OracleUpdater.php
+++ b/includes/installer/OracleUpdater.php
@@ -116,6 +116,8 @@
// 1.28
[ 'addIndex', 'recentchanges', 
'rc_name_type_patrolled_timestamp',

'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
+   [ 'addField', 'change_tag', 'ct_id', 
'patch-change_tag-ct_id.sql' ],
+   [ 'addField', 'tag_summary', 'ts_id', 
'patch-tag_summary-ts_id.sql' ],
 
// KEEP THIS AT THE BOTTOM!!
[ 'doRebuildDuplicateFunction' ],
diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index be94d91..f3d2860 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -68,6 +68,8 @@
[ 'addSequence', 'archive', false, 'archive_ar_id_seq' 
],
[ 'addSequence', 'externallinks', false, 
'externallinks_el_id_seq' ],
[ 'addSequence', 'watchlist', false, 
'watchlist_wl_id_seq' ],
+   [ 'addSequence', 'change_tag', false, 
'change_tag_ct_id_seq' ],
+   [ 'addSequence', 'tag_summary', false, 
'tag_summary_ts_id_seq' ],
 
# new tables
[ 'addTable', 'category', 'patch-category.sql' ],
@@ -437,6 +439,10 @@
// 1.28
[ 'addPgIndex', 'recentchanges', 
'rc_name_type_patrolled_timestamp',
'( rc_namespace, rc_type, rc_patrolled, 
rc_timestamp )' ],
+   [ 'addPgField', 'change_tag', 'ct_id',
+   "INTEGER NOT NULL PRIMARY KEY DEFAULT 
nextval('change_tag_ct_id_seq')" ],
+   [ 'addPgField', 'tag_summary', 'ts_id',
+   "INTEGER NOT NULL PRIMARY KEY DEFAULT 
nextval('tag_summary_ts_id_seq')" ],
];
}
 
diff --git a/includes/installer/SqliteUpdater.php 
b/includes/installer/SqliteUpdater.php
index 1c6e6eb..388c034 100644
--- a/includes/installer/SqliteUpdater.php
+++ b/includes/installer/SqliteUpdater.php
@@ -156,6 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add primary key to change_tag and tag_summary tables

2016-08-10 Thread TTO (Code Review)
TTO has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/304165

Change subject: Add primary key to change_tag and tag_summary tables
..

Add primary key to change_tag and tag_summary tables

Based heavily on 43e386ca16411096bbbd7f14f9f4e15c5e268fe7.

Bug: T123225
Change-Id: I33480f4016812259700979f1145099744bb451d4
---
M includes/installer/MssqlUpdater.php
M includes/installer/MysqlUpdater.php
M includes/installer/OracleUpdater.php
M includes/installer/PostgresUpdater.php
M includes/installer/SqliteUpdater.php
A maintenance/archives/patch-change_tag-ct_id.sql
A maintenance/archives/patch-tag_summary-ts_id.sql
A maintenance/mssql/archives/patch-change_tag-ct_id.sql
A maintenance/mssql/archives/patch-tag_summary-ts_id.sql
M maintenance/mssql/tables.sql
A maintenance/oracle/archives/patch-change_tag-ct_id.sql
A maintenance/oracle/archives/patch-tag_summary-ts_id.sql
M maintenance/oracle/tables.sql
M maintenance/postgres/tables.sql
A maintenance/sqlite/archives/patch-change_tag-ct_id.sql
A maintenance/sqlite/archives/patch-tag_summary-ts_id.sql
M maintenance/tables.sql
17 files changed, 106 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/304165/1

diff --git a/includes/installer/MssqlUpdater.php 
b/includes/installer/MssqlUpdater.php
index 770d3bf..1175e9e 100644
--- a/includes/installer/MssqlUpdater.php
+++ b/includes/installer/MssqlUpdater.php
@@ -92,6 +92,8 @@
// 1.28
[ 'addIndex', 'recentchanges', 
'rc_name_type_patrolled_timestamp',

'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
+   [ 'addField', 'change_tag', 'ct_id', 
'patch-change_tag-ct_id.sql' ],
+   [ 'addField', 'tag_summary', 'ts_id', 
'patch-tag_summary-ts_id.sql' ],
];
}
 
diff --git a/includes/installer/MysqlUpdater.php 
b/includes/installer/MysqlUpdater.php
index 719b66a..8ea40da 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -287,6 +287,8 @@
// 1.28
[ 'addIndex', 'recentchanges', 
'rc_name_type_patrolled_timestamp',

'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
+   [ 'addField', 'change_tag', 'ct_id', 
'patch-change_tag-ct_id.sql' ],
+   [ 'addField', 'tag_summary', 'ts_id', 
'patch-tag_summary-ts_id.sql' ],
];
}
 
diff --git a/includes/installer/OracleUpdater.php 
b/includes/installer/OracleUpdater.php
index 8075aac..e1e0d0f 100644
--- a/includes/installer/OracleUpdater.php
+++ b/includes/installer/OracleUpdater.php
@@ -116,6 +116,8 @@
// 1.28
[ 'addIndex', 'recentchanges', 
'rc_name_type_patrolled_timestamp',

'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
+   [ 'addField', 'change_tag', 'ct_id', 
'patch-change_tag-ct_id.sql' ],
+   [ 'addField', 'tag_summary', 'ts_id', 
'patch-tag_summary-ts_id.sql' ],
 
// KEEP THIS AT THE BOTTOM!!
[ 'doRebuildDuplicateFunction' ],
diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index be94d91..aba520b 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -68,6 +68,8 @@
[ 'addSequence', 'archive', false, 'archive_ar_id_seq' 
],
[ 'addSequence', 'externallinks', false, 
'externallinks_el_id_seq' ],
[ 'addSequence', 'watchlist', false, 
'watchlist_wl_id_seq' ],
+   [ 'addSequence', 'change_tag', false, 
'change_tag_ct_id_seq' ],
+   [ 'addSequence', 'tag_summary', false, 
'tag_summary_ts_id_seq' ],
 
# new tables
[ 'addTable', 'category', 'patch-category.sql' ],
diff --git a/includes/installer/SqliteUpdater.php 
b/includes/installer/SqliteUpdater.php
index 1c6e6eb..388c034 100644
--- a/includes/installer/SqliteUpdater.php
+++ b/includes/installer/SqliteUpdater.php
@@ -156,6 +156,8 @@
// 1.28
[ 'addIndex', 'recentchanges', 
'rc_name_type_patrolled_timestamp',

'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
+   [ 'addField', 'change_tag', 'ct_id', 
'patch-change_tag-ct_id.sql' ],
+   [ 'addField', 'tag_summary', 'ts_id', 
'patch-tag_summary-ts_id.sql' ],
];
}
 
diff --git a/maintenance/archives/patch-change_tag-ct_id.sql 
b/maintenance/archives/patch-change_tag-ct_id.sql
new file mode 100644
index 000..7b986d6
--- /dev/null
+++