Commit graph

59 commits

Author SHA1 Message Date
James D. Forrester
242df680ce maintenance: Replace implicit Bugzilla bug numbers with Phab ones
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.

This includes renaming fixBug20757.php to fixT22757.php for similar consistency.

Change-Id: If81a590d658fbd82c20c54ac47dfdc8856745ca3
2017-02-21 18:32:44 -08:00
This, that and the other
73224f4f8b User group memberships that expire
This patch adds an ug_expiry column to the user_groups table, a timestamp
giving a date when the user group expires. A new UserGroupMembership class,
based on the Block class, manages entries in this table.

When the expiry date passes, the row in user_groups is ignored, and will
eventually be purged from the DB when UserGroupMembership::insert is next
called. Old, expired user group memberships are not kept; instead, the log
entries are available to find the history of these memberships, similar
to the way it has always worked for blocks and protections.

Anyone getting user group info through the User object will get correct
information. However, code that reads the user_groups table directly will
now need to skip over rows with ug_expiry < wfTimestampNow(). See
UsersPager for an example of how to do this.

NULL is used to represent infinite (no) expiry, rather than a string
'infinity' or similar (except in the API). This allows existing user group
assignments and log entries, which are all infinite in duration, to be
treated the same as new, infinite-length memberships, without special
casing everything.

The whole thing is behind the temporary feature flag
$wgDisableUserGroupExpiry, in accordance with the WMF schema change policy.

The opportunity has been taken to refactor some static user-group-related
functions out of User into UserGroupMembership, and also to add a primary
key (ug_user, ug_group) to the user_groups table.

There are a few breaking changes:
- UserRightsProxy-like objects are now required to have a
  getGroupMemberships() function.
- $user->mGroups (on a User object) is no longer present.
- Some protected functions in UsersPager are altered or removed.
- The UsersPagerDoBatchLookups hook (unused in any Wikimedia Git-hosted
  extension) has a change of parameter.

Bug: T12493
Depends-On: Ia9616e1e35184fed9058d2d39afbe1038f56d7fa
Depends-On: I86eb1d5619347ce54a5f33a591417742ebe5d6f8
Change-Id: I93c955dc7a970f78e32aa503c01c67da30971d1a
2017-01-27 09:24:20 +00:00
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01:00
This, that and the other
d0a0e9b417 Add primary key to change_tag and tag_summary tables
Based heavily on 43e386ca16.

Bug: T123225
Change-Id: I33480f4016812259700979f1145099744bb451d4
2016-10-02 13:02:41 +11:00
addshore
43e386ca16 Add id field to watchlist db table
Bug: T125990
Change-Id: I3ce3a736d51bc06fe40fd773f079e694039b4f3e
2016-02-18 21:01:01 +00:00
Brian Wolff
5d9b67e09e Allow edit summaries to be up to 767 bytes long
This is just the db part. The changes to UI validation code will
come in a dependent patch later.

This changes the max size of various *_comment, *_description
and *_reason fields to be 767 bytes. This size is chosen to
be consistent with the largest we can get away with while
still having covering indexes.

It also unifies the various data types of these fields to
varbinary. (Note, this was previously done and reverted in
r80547, but I don't think the reason for revert applies to
the edit summary fields)

MyISAM has a much smaller max index size, and this wouldn't
work with that storage engine. However, none of these fields
are used in default indexes (only in WMF indexes), so this
should not be an issue for anyone using MyISAM. Postgress
and sqlite already supported the larger edit summary size.

Note: This patch increases min mysql version to 5.0.3.

Bug: T6715
Change-Id: I8558e80a18e4591f07f2c3e80f792ea4435c4e71
2015-03-11 13:36:38 +00:00
Chad Horohoe
5f8edb2c0a Drop ss_total_views and page_counter fields from MediaWiki
Follows up removal of code using hitcounters in 90d90dad6

RFC: https://www.mediawiki.org/wiki/Requests_for_comment/Removing_hit_counters_from_MediaWiki_core
Change-Id: Ieeb558f9523c11965cbc1941cad4f316c00c85c5
2015-01-09 19:01:01 +00:00
Kunal Grover
50144cd02a First version of Page Language selector
Special page PageLanguage to set the page language of a page.
To enable the feature, set $wgPageLanguageUseDB to true
and assign the 'pagelang' user right to a user group.

Bug: 35489
Change-Id: I0f82b146fbe948f917c1c5d29f7469644d797e80
2014-06-27 23:27:07 +00:00
umherirrender
2b441eba40 Drop rc_cur_time from recentchanges
Field was removed in 1.23 from sql statements, but kept to allow easier
rollback on version update from 1.22 -> 1.23, when something gets wrong
with the new version.

Bug: 40667
Follow-Up: I4a9c2fa813d1f25dfb755e564f7677a212934d7b
Change-Id: I48989aceec31019f0b6c98aaeafaf60e975244df
2014-05-15 17:10:16 +00:00
umherirrender
8175727af5 move page_restrictions.pr_id to top in tables.sql
Having the primary key at the top of the column definition looks nicer
and helps by finding him.
Oracle and Postgres already have this moved up.

Change-Id: Id8afbff35e165919f55dfcf1fd1dfaf1805d6aab
2013-11-18 19:47:53 +01:00
tisane
9b2b027ba7 Add archive, externallinks PK
* New fields: ar_id, el_id. el_id is presently not used for
  anything, but will help with online schema changes.

Bug: 15441
Bug: 39675
Change-Id: Ib6b0fc3736d173fa4ba7b786ecfc710b2f4711bb
2013-10-17 18:43:40 +01:00
Brad Jorsch
c013ec02b9 (bug 36400) API: Fix sorting for iwlinks, langlinks
The iwlinks and langlinks modules continue parameters imply ordering by
page then prefix then title. But in certain modes, the actual queries
use a different ordering, which may result in skipped or repeated
results.

This changeset fixes that. To do so, it needs to re-add an index
iwl_prefix_from_title which was mistakenly removed in 2010 (r69721). And
while it's doing that, it cleans up errors in the sqlite and postgresql
handling of the iwlinks indexes too.

Also, per Asher, make the iwl_prefix_from_title and
iwl_prefix_title_from indexes non-UNIQUE.

Change-Id: I607e8bf9183a2d8152a6127a81c83a0b5bba0c61
2013-04-03 13:22:20 -04:00
Reedy
0c5301a0d1 Bug 11057 - Increase size of ug_group in user_groups table
Change-Id: I79fd5c6e1566de3145ac39420da4fce77099745a
2013-01-02 20:32:42 +00:00
aude
4fbaa0b822 update.php now create profiling table when needed
When enabling $wgProfileToDatabase, one would have to manually apply a
patch to the database that would add the `profiling` table. This patch
let update.php creates the table whenever $wgProfileToDatabase is true.

This also provide a SQL patch for SQLite backend and update
profileinfo.php to give some clue about enabling the global and running
update.php

Change-Id: If68a25f7ec2b0fbb61f82a318427abe58a89dae7
2012-11-19 12:38:32 +01:00
umherirrender
c157f4d424 Remove a bunch of trailing spaces and unneeded newlines
Change-Id: I52ae3c55044bc8c53698e356bad74969406670bf
2012-10-20 13:32:35 +02:00
ASchulz
b567f3602e [JobQueue] Job queue refactoring and generalizing.
* Added support for different queue types and methods for storing queues.
* Treat each job type as being on its own queue, at least logically.
* Added $wgJobTypeConf to configure queue types for each job type.
* Improved the job DB table so that duplicate job checks actually work
  and are faster. Also improved the method for popping rows of the table.
* Disabled duplicate job removal for everything except refreshLinks.
  The DELETE statements just add DB overhead and are not useful for cheap
  jobs, especially ones with start/end params (which are unlikely to have
  exact duplicates).

Change-Id: I49824c7fa855fea4ddcac5c9901ece8c2c0101d0
2012-10-16 09:39:58 +11:00
jeroendedauw
7389d7c690 Added sites functionality, a much more generic and flexible version of the existing interwiki code
This code is meant to replace the current interwiki code, but does not do so just yet. It is however used by the Wikibase extension. This allows us to try out some more things and have the code stabilize more before we migrate over existing interwiki functionality.

Change-Id: I23c47c2c3909a1500350fb560a5f2ec654e2c37e
2012-10-12 17:47:44 +02:00
umherirrender
e6a6b33567 (bug 34960) drop unused fields rc_moved_to_ns/rc_moved_to_title
Change-Id: I68e8c0bb23f185c0f996a8905f6d437db3080aa1
2012-09-29 17:19:40 +02:00
umherirrender
bd602d2083 Drop unused database field ss_admins
no longer updated since 1.5

Change-Id: Iebdce084d178b5003105b2d2b7dcc499c274ff56
2012-09-29 12:20:21 +02:00
umherirrender
0cbc85494d (bug 32552) Drop unused database field cat_hidden
For the hiddencat feature the page prop table is used

Change-Id: If01d3394617ab8aec1a9b50c20bfe923df08732c
2012-09-06 18:47:39 +02:00
Sam Reed
5f230a3a19 Can someone standardi[sz]e SQL already!?
Might aswell change mysql to same format as the sqlite one is becoming

Ping r113110
2012-03-06 00:26:48 +00:00
Sam Reed
921c862c97 Followup r113109, forward port the rest of r25267 for Bug 10788 - Filter page histories by user, or contributions by title 2012-03-06 00:09:18 +00:00
Sam Reed
790925d3ac Not much point making user_groups.ug_group 32 chars if we leave user_former_groups.ufg_group at 16
Also fix modify field to use correct table/column
2012-02-06 16:07:52 +00:00
Antoine Musso
44b06f908e reverts Concurrency works
trunk is frozen pending stabilisation so we can release MediaWiki 1.19.
Those changes introduces API changes and new SQL tables, so that sounds like
new feature we do not have time to review right now.

Please reapply changes in branches/concurrency and have code review handled
there. Once the branch has been reviewed, please hold. Once trunk is stable
enough and 1.19 got branched, you are welcome to merge the branch in trunk.

Note: we can have a Jenkins jobs setup to run the branch tests if you need.

Reverts:
r108595 r108591 r108585 r108584 108572 r108564 108560 r108559
2012-01-11 09:05:56 +00:00
Ian Baker
afdc8b34d8 Updated to use correct cross-db timestamps and date functions
Added to SQLite updater
2012-01-10 23:42:03 +00:00
Sam Reed
faca3cb2e7 * (bug 27724) Add timestamp to job queue.
Designed for administration purposes, not to be exposed to front end users

Useful for administration purposes (like WMF with job runners), we can look at the "highest" jobs, and find out whether enwiki is just busy, or the jobs have been there a while (signalling that the job runners potentially have issues)
2012-01-03 15:08:05 +00:00
Chad Horohoe
7914b2ee68 (bug 29475) Remove "trackback" feature entirely from core. This has been disabled-by-default since its inception and nobody uses it.
If someone really really wants this, they can write an extension.

Language files need rebuilding, but I took care of En and messages.inc.
2011-11-23 17:14:03 +00:00
Sam Reed
c6b3c2f05b * (bug 32470) Increase the length of ug_group
Postgres doesn't need extending...
2011-11-19 16:26:28 +00:00
Jure Kajzer
12dabfbc10 * applyed the patch from bug 26393 (please comment on the bug page) 2011-11-11 14:28:44 +00:00
Alexandre Emsenhuber
330859157b svn:eol-style native 2011-10-04 14:11:16 +00:00
Max Semenik
3a20036ca4 Revert r98355 and r98357; drop the field instead. 2011-10-02 06:10:55 +00:00
Sam Reed
52bb2e5a28 Followup r98339
Don't try and remove the user_options column in SQLite

Added 'user.user_options' to ignores
2011-09-28 19:28:19 +00:00
Max Semenik
2d99f7203f Folow-up r89526: tabs and eol-style :( 2011-06-05 19:46:08 +00:00
Max Semenik
4acbaa1728 SQLite: sync a couple of indexes with MySQL 2011-06-05 19:39:28 +00:00
Matěj Grabovský
c4a741d7f6 Create index only if it doesn't already exist 2011-01-26 10:33:21 +00:00
Chad Horohoe
2635ee9a32 Fix r69721: SQLite yells at you if you try to drop an index that doesn't exist; which might be the case considering how many times these indexes were renamed and dropped. Per r73758, put IF EXISTS on them--it certainly can't hurt. 2010-11-03 12:41:46 +00:00
Max Semenik
68b39fbd23 Revert r74273 per CR: this patch is not needed because our SQL conversion magic handles the MySQL version just fine, and I've tweaked it in r74428 to look nicer 2010-10-07 16:20:20 +00:00
Antoine Musso
575711fde2 Profiling table (optional) for SQLite 2010-10-04 20:55:14 +00:00
Max Semenik
97efc5c6c3 A few index-related fixes in SQLite DB patches, ping r66920.
The need to drop index patch-rename-iwl_prefix.sql arose from development versions that had discrepancies between tables.sql and updater. Let's just DROP IF EXISTS it.
2010-09-25 17:45:00 +00:00
Max Semenik
bb65748dc9 Follow-up r71118: forgot to re-add the index 2010-09-12 18:00:28 +00:00
Max Semenik
219717307e Follow-up r72870: fixed patch file so that it actually works, switched it to native SQLite types 2010-09-12 17:48:56 +00:00
Alexandre Emsenhuber
86eb53c8ca GOOD BYE, dear old updaters.inc!
* Moved update functions to MysqlUpdater and DatabaseUpdater (and archive() to install-utils.inc just in case someone is still using it)
* Moved update_row_exists() to DatabaseUpdater
* Added cl_collation patch for SQLite, was missing and also run collationUpdate.php while updation SQLite
2010-09-12 16:24:03 +00:00
Alexandre Emsenhuber
2b98748b6a Added SQLite version of the patch since the other one has syntax errors on SQLite 2010-09-12 12:28:21 +00:00
Max Semenik
0ce11ce403 Fixed SQLite updater broken by r69542 2010-08-15 14:49:07 +00:00
Roan Kattouw
61de1b9006 Rename the iwl_prefix_from_title index (again) to iwl_prefix_title_from and change the field order accordingly. Fixed r66892 which inserted iwl_from into the index (which was a good thing) but put it in the wrong place. I went out of my way to make sure the index isn't dropped and recreated needlessly, but since I don't know how to do the drop-index-if-exists thing in the Postgres updater, I left that out. The Postgres updater will now create the new index without dropping any old incarnations if present. I did create the patch files with the DROP INDEX statements to make it easier to add this behavior. Also tweak ApiQueryIWBacklinks to use this index properly. 2010-07-22 08:52:58 +00:00
Mark A. Hershberger
572bfe1228 * re r69332, r64217: complete removal of WikiSysop for CLI installer
* Incorporate new Installer::performInstallation() function
* Update SQLite schema tables to insert data to updatelog correctly
2010-07-18 18:52:05 +00:00
Max Semenik
ca2371de95 follow-up to r66892: fix update SQL on on SQLite 2010-05-26 14:29:53 +00:00
Max Semenik
9b257aa857 Updated link to docs 2010-01-17 13:35:26 +00:00
Max Semenik
3a15dc11f6 Updated comment in accordance with r58030 2009-12-17 12:53:05 +00:00
Max Semenik
7b7ed1034d Whee, a debugging piece of SQL had made it through in r59932 2009-12-11 23:30:08 +00:00