Commit graph

244 commits

Author SHA1 Message Date
Reedy
113f49bb21 Revert "Add new recentchanges field rc_source to replace rc_type"
No feature flag, and also not deployed on WMF wikis. Asking for schema changes by the time we branch tomorrow is just unfair

This reverts commit e478c230f6.

Change-Id: I125c30e76fa04679cc04ae7b8728ae3a61f35194
2013-10-17 00:32:40 +00:00
Erik Bernhardson
e478c230f6 Add new recentchanges field rc_source to replace rc_type
The existing field to differentiate between kinds of recentchanges rows is
the rc_type field. We want to allow extensions to insert their own custom
data into recentchanges, but we have learned via the NS_* series of constants
that requiring extensions to "register" a specific number is very error prone.

The solution, which this commit implements the first phase of, is to utilize
a new 16 byte string field rc_source.  Within that field change types will be
prefixed strings such as 'mw.edit' and 'mw.new'.

This commit adds the new field and begins populating it with data.  At some
point in the future the rc_type field will be dropped.  While WMF wiki's will
simply wait out the 30 day recentchanges history, other wiki's have the option
of letting update.php populate rc_source, or manually applying the db change and
utilizing the PopulateRecentChangeSource maintenance script.

Change-Id: Iaddd6c446373a68d31586ed54346db7d04e13b2c
2013-10-16 11:35:20 -07:00
Jesús Martínez Novo
3d8bfee35b drop unused fields rc_moved_to_ns/rc_moved_to_title
Follow-up I68e8c0bb23f185c0f996a8905f6d437db3080aa1

Deleting those fields also from tables.sql definition
for mssql, oracle and postgres

Bug: 34960
Change-Id: I1867536c9161abed0b23428d3c840d16a05cba56
2013-09-21 02:46:13 +00:00
Chad Horohoe
36cade5fe8 Remove ExternalUser authentication code
This was an experimental authentication system intoduced a couple
of years ago with a pretty narrow use-case. It's been pretty much
ignored since introduction, and makes login more complicated than
it needs to be.

I didn't drop the external_user table on the off-chance someone
out there actually has data in it, but they should use AuthPlugin
for their external authentication needs.

Change-Id: I794338dbb75961ee033d41fa44bb7aa22e54f447
2013-04-04 10:09:34 -04: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
jenkins-bot
ed4db4af0a Merge "Add pp_propname_page index to page_props" 2013-02-25 22:54:48 +00:00
jenkins-bot
2152738bca Merge "Include Postgres tables and maintenance scripts for Change I23c47c2c" 2013-02-02 11:07:57 +00:00
Brent Garber
4509c1111e Include Postgres tables and maintenance scripts for Change I23c47c2c
Change-Id: I1b2fe2b80700678935bf6d28c3a48538d044d3f4
2013-02-01 20:09:40 +00:00
Tim Landscheidt
5421548819 Add column job_attempts and index job_cmd_token_id to PostgreSQL.
* (bug 43416) This ports cd000590ee.

Change-Id: I3d4c7d906f6465b3a054df2fc0cd8f564173ed2b
2013-02-01 11:45:37 -08:00
Brad Jorsch
bc4c2ef32d Add pp_propname_page index to page_props
This adds an index to page_props to support looking up pages using a
particular property.

Change-Id: Iea778eb783e1d4a46fb0549dfd84915477cac5df
2013-01-21 22:08:10 +00:00
MarkAHershberger
cca318981d Bug 42039 - Fix some file-related issues in the distribution
Minor issues.

Tested the removal of
maintenance/postgres/archives/patch-ipb_address_unique.sql in a new
installation but haven't tested it on an upgrade.

Change-Id: I58aa11c5acab5de427cbc000e6786a208fc6b26f
2012-11-12 09:37:28 -05:00
Reedy
cc18322559 Back out config table and related code
Change-Id: I4fa180d45984a4ec2b2c7b1149015c6dad14c5f0
2012-10-29 15:17:24 +00:00
Tim Landscheidt
a4193673b2 Add additional job columns to PostgreSQL as well.
This ports I49824c7fa855fea4ddcac5c9901ece8c2c0101d0 and fixes
bug #41196.

Change-Id: I18e0ac3aee2c2627f89d28d4a34afd90c822af91
2012-10-24 18:56:54 +00:00
IAlex
08d9eb261c Merge "Add filearchive.fa_sha1 to PostgreSQL as well." 2012-10-20 14:47:08 +00:00
umherirrender
c157f4d424 Remove a bunch of trailing spaces and unneeded newlines
Change-Id: I52ae3c55044bc8c53698e356bad74969406670bf
2012-10-20 13:32:35 +02:00
Tim Landscheidt
b5df3f37d1 Add filearchive.fa_sha1 to PostgreSQL as well.
This fixes bug #41114.

Change-Id: I021070f90d35d99ad55944543e94004f62d5f08c
2012-10-20 03:37:53 +00:00
freakolowsky
287bf0db12 Add *_content_(model|format) fields to PostgreSQL
Create ContentHandler field for PostgreSQL
(for installer and the update).

TEXT was chosen as replacement for MySQL VARBINARY(32)

Change-Id: Ia86ae79d37517630e1767dfb976604bbb174104b
2012-10-11 20:53:16 +00:00
Marc A. Pelletier
7694faf68f (bug 5445) remove autoblocks when user is unblocked
Previously, whenever we blocked a user, its IP address would be
autoblocked whenever he tries to edit a page. Thus when later unblocking
the username, he would be automatically blocked again if we forgot to
clean up is IP.

This patch introduces a the ipb_parent_block_id column in ipblocks table
to track which block triggered the autoblock command. Thus, when deleting
the original block we can easily remove all subsequentautoblocks.

Schema updaters for MySQL, SQLite and postgres have been added to the
patch but not for the other database types such as ibm_db2, mssql and
Oracle.

Change-Id: I4aa820ae9bbd962a12d0b48b6c638a1b6ff4efc9
2012-05-03 12:07:30 +02:00
saper
91eb34756e Fix broken merge by 0a792a1dcb
Changeset 1 of https://gerrit.wikimedia.org/r/#change,3365:
763b57f9f2af131a2d8e65f520a23c00109be0e1

got mis-merged in changeset 2:
f752cf8042

And introduced into master wth
0a792a1dcb

Also, marking all new functions as @since 1.19
since we want to have them there later.

Patchset 2: whitespace fixes
Patchset 3: Fix <?php
Patchset 4: rebase to current master

Change-Id: Ic7d940dfec8890de20197128505962375fac4f06
2012-04-13 20:55:14 +02:00
saper
f752cf8042 Fix PostgreSQL updater to produce 1.19 schema
* PostgresField now reports column default value
* DatabasePostgres::indexAttributes reports index
  details
* Perform schema update in one transaction

With this change we can sucessfully update
MediaWiki 1.7.3 schema to trunk^Wmaster

Patch set 2: Rebased against master. PLEASE check carefully
to make sure I got those conflicted files right.

Conflicts:

	includes/db/DatabasePostgres.php
	includes/installer/PostgresUpdater.php

Change-Id: Iebb6855e8f6f44470bbb1dc5ab9ac1abb513adfe
2012-04-10 12:59:21 -04:00
Demon
b2a3c87792 Postgres updater: add config table, adjust us_image_bits type
This is a followup to I18e67bcb, that I failed to notice before merging

Change-Id: Ia96f831f279b0f6a348f1db80ecf30298ecf064c
2012-04-04 09:54:53 -04:00
Greg Sabino Mullane
98b9296303 PostgreSQL schema: datatype updates, remove unused column, add table
* More allowed data type conversions from MySQL to PostgreSQL
* Allow for data type SMALLINT: seen for first time!
* Handle CREATE TYPE: check for dupes, and allow the name as a valid data type.
* Remove the now-deprecated user_options column.
* Add new table "config"

Change-Id: I18e67bcb131b88bfaea7e736f302dd79ebfc9b82
2012-04-04 09:15:51 -04:00
OverlordQ
351332641a Followup to r107866, add in new job_timestamp field which was likely completely breaking anything related to the job queue, should fix failing TemplateCategoriesTest.testTemplateCategories on PG 2012-01-12 22:11:12 +00:00
OverlordQ
44ce86ac01 Followup to whatever revision added us_chunk_inx 2012-01-12 17:10:48 +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
OverlordQ
4912a6c2ee Followup to r103365, actually include said patch file 2011-11-16 19:55:21 +00:00
OverlordQ
0074526857 Followup to r100640, use correct name scheme for sequence, correct references to sequence and add optional patch file for sites following trunk 2011-11-16 19:54:38 +00:00
OverlordQ
608d6bba76 Followup to r101021, add back to Pg schema so we can install mediawiki 2011-10-31 20:03:43 +00:00
OverlordQ
8cd73f35ff Update Postgres with missing uploadstash tables 2011-10-24 19:43:16 +00:00
Aaron Schulz
a4d029210a Follow-up r90749:
* Removed useless ufg_group index from user_former_groups
* Index name consistency
2011-06-25 04:11:20 +00:00
Aaron Schulz
cb6b72cef7 Added one-time promote support via Autopromote::autopromoteOnceHook function. This is still a bit rough on the edges. This uses a hook since extension may want to control when it's called for performance reasons. Patch by lampak. (for bug 24948) 2011-06-25 02:52:30 +00:00
Brion Vibber
5f0afcf1a2 Breaking the 'math' table setup out to Math extension. Should be the last main step in extension-ification of the math options!
The 'math' table will no longer be created on a default install unless you've explicitly enabled the Math plugin at install time; the usual update.php procedure will add it in.

Postgres, Oracle, MSSQL, and DB2 variants are included -- broken out from the core files -- but have not been tested.

I know there has been some code duplication in parser test infrastructure but could only find one instance of the parser test temporary table setup to remove the 'math' table from (the extension adds it back via the hook). If the phpunit-based runner breaks, please track it down and fix it there too.
2011-04-22 21:37:16 +00:00
Mark A. Hershberger
fcdb3fa87a Apply patch from Karsten Düsterloh in Bug #28103.
Karsten writes:

    If the $table_prefix is not empty, several table renamings will happen,
    including for 'pagecontent' and 'mwuser'. This breaks the import into postgres,
    because
    - 'pagecontent' doesn't exist (temporarily renamed to 'text')
    - 'mwuser' won't exist later (temporarily renamed to 'mw_mwuser')
    Also, some sequence names are wrong.
    Furthermore, some of the generated ALTER statements lack the final semicolon

    The attached patch contains the changes I had to do to make this run.
2011-04-22 18:47:17 +00:00
Greg Sabino Mullane
bdc93f0de8 Not sure I like the DROP stuff here, but let's exclude it from this script. 2011-02-14 00:36:36 +00:00
Mark A. Hershberger
13e7d428b1 followup r13884 add CASCADE so that if the tables are created a second
time, errors aren't given.
2011-02-05 22:20:09 +00:00
Mark A. Hershberger
1eb2307caa Results of my work on new-installer and Pg.
* NOTE: this commit removes any semblence of tsearch compatibility with pre-8.3 PostgreSQL
* Make new-installer work against PostgreSQL
* Remove SearchPostgres.php's call to pg_fetch_result.  I think this is the only one outside of the vestigtial old installer code.
2011-02-03 04:06:11 +00:00
Greg Sabino Mullane
a159977153 Use text_pattern_ops for page_title, as some code uses 'anchor%' matching. 2011-01-19 16:14:37 +00:00
Greg Sabino Mullane
c4a15c727c Don't put multiple tables in the same file. 2010-12-30 18:53:48 +00:00
Mark A. Hershberger
962be1d210 * Commit changes to PG new-installer I thought I had done last week.
* Set up and use function for renaming tables
* Use $conn instead of $this when it is called for
* remove protection from commitChanges so the installer can use it
2010-12-01 20:15:45 +00:00
Alexandre Emsenhuber
7789116f29 Moved testRunner[|.ora|.postgres].sql to [|oracle/|postgres/]archives/ so that they can be called through DatabaseBase::patchPath(), much simplier 2010-11-09 17:41:00 +00:00
Greg Sabino Mullane
bd4fb0982a cl_sortkey now back down to varbinary(230). Glad PG doesn't have this issue. 2010-10-15 15:39:48 +00:00
Greg Sabino Mullane
8ba8c11f1e Remove parserTests.inc checks, as testing is now done quite differently. 2010-10-05 15:00:19 +00:00
Greg Sabino Mullane
cb1c5fd26b Add new index on pagelinkes(pl_title) per suggestion from bug 25111 2010-09-13 15:04:04 +00:00
Greg Sabino Mullane
84a28b19b7 Add the "page" table back in when upgrading from really old MW versions using Postgres 2010-09-13 14:26:38 +00:00
Greg Sabino Mullane
5f38f7af66 Adjustments for new tables. 2010-09-08 02:04:14 +00:00
Greg Sabino Mullane
da86748730 Add new tables. 2010-09-08 02:02:28 +00:00
OverlordQ
b7c0058a7e Followup to r72349, PG table def + updater for module_deps 2010-09-04 04:14:51 +00:00
OverlordQ
d97bb6f129 Followup to r72349, PG tables + updater 2010-09-04 04:10:23 +00:00
OverlordQ
656f399be3 Fix sequence renaming to be backwards-compat with older versions of PG. Needs merged with 1.16 2010-09-03 21:17:33 +00:00
Greg Sabino Mullane
7eac02fe48 Bump cl_collation from smallint to a text 2010-09-03 21:08:16 +00:00