Commit graph

405 commits

Author SHA1 Message Date
Amir Sarabadani
753a4ecdd3 Bump minimum required version for upgrade to 1.29
Since the branch cut has happened, we can bump and get rid of legacy
cruft. According to the policy we can go up to 1.31 but let's keep it
that way to avoid major distruptions.

Change-Id: I9d697445a3bb5047726c8b2a7f808edb8403cdda
2021-09-28 17:57:57 +02:00
Reedy
0eb23b5cc9 MysqlUpdater: Add updatelog entries for dropDefault
Currently, this update is run every time update.php is run,
because mysqli usually returns ""

Change-Id: I9f862138b5e024798b27cfd4814810cbca43ae38
2021-09-22 16:08:27 +00:00
Ammar Abdulhamid
1adaca51c3 Rename change_tag indexes to have ct_ prefix
Bug: T270033
Change-Id: I8a429726c99f6cadea0d671fd871f66b5611c856
2021-06-08 17:57:15 +01:00
Ammarpad
a8c01d7726 Rename name_title index to have page_ prefix
Bug: T270033
Change-Id: Id70d0e0a37dd0d000079820d51cef2791f5ec42e
2021-06-05 20:21:07 +02:00
Amir Sarabadani
7fdca7ce51 Add index on oldimage.oi_timestamp
Mirroring what happens on image table.

Bug: T279982
Change-Id: Ib67c32b10d3b88e09514d8fbb5dcb4f977108ba2
2021-05-29 20:44:32 +02:00
Ammarpad
5954b380fc Migrate revision table to abstract schema
Postgres:
 - Drop foreign key from rev_page
 - Make rev_page not nullable
 - Change rev_comment_id from int to bigint
 - Change rev_actor from int to bigint
 - Sync rev_page_id index with MySQL

MySQL/SQlite:
 - Drop default from rev_timestamp

Additional changes in the generator script to handle more
formatting issues due to use of additional custom table options

Bug: T230428
Bug: T164898
Change-Id: Ia07dd52e43123473a1728523a3f863280537db8e
2021-05-20 14:52:15 -07:00
Aaron Schulz
12923c1cd5 objectcache: add last-modified token field to objectcache table
Also added token and flags fields. The token field can
be used as a tie-breaker for modtime and also for faster
cas() operations. The flags field makes serialization and
compression format changes easier in the future.

Bug: T274174
Change-Id: I45731a877b21835652993c2d285165a76eeae3e9
2021-05-18 20:06:37 -07:00
Ammarpad
d9400049cf Rename page_timestamp revision index
Rename to `rev_page_timestamp`

Bug: T270033
Depends-On: I16fc273b14e7f4b00e8c31ec1ed7712149aafe37
Change-Id: I93fcfb3caf8c6bd7f9e46921065b751c23571ae1
2021-04-30 06:58:25 +01:00
jenkins-bot
dc5e51c15c Merge "Drop doWatchlistUpdate from MysqlUpdater" 2021-04-03 18:11:07 +00:00
jenkins-bot
3f96a72ac9 Merge "Prepare for migrating user to abstract schema" 2021-03-28 10:31:03 +00:00
Ammarpad
c697406d3f Prepare for migrating user to abstract schema
Split off to make the migration patch smaller

Postgres:
 - Make user_touched not nullable

MySQL/SQlite
 - Change user_name from varchar to varbinary
 - Change user_name from varchar to varbinary
 - Drop empty string default from user_touched (Timestamp field)

Bug: T230428
Bug: T164898
Change-Id: I8fe0b1fb2af3149a2e2fdae7bb056ac6f863b09c
2021-03-28 09:55:07 +01:00
Amir Sarabadani
6744420f1a Drop doWatchlistUpdate from MysqlUpdater
I have been going back and forth and finally decided that we should
remove this method.

It checks if a page doesn't have its talk page in watchlist of users and
it adds them if missing.

It's either:
 - You are upgrading from a really old version (1.4) which we don't
   support direct upgrade anymore or
 - There are missing rows due to failures in the database transactions.
   This seems valid and that's why it gets ran in every update.php
   (making it a lot slower on a even medium-sized wiki) but we can't
   have a script to check and fix any sort of failure on our system.
   What about cleaning up deleted revs? If the user really wants to
   clean them, they should do it themselves.

Bug: T272199
Change-Id: Ic90829276406a4383496a5ae6f040bc371732773
2021-03-27 10:40:41 +01:00
Ammarpad
eece54b831 Remove unused schema change.
There's no reason to keep schema change that's no longer useful.
History is already tracked by git.

Change-Id: Ia8aa0d21ae5f2d799d9a641ebe7b924f56e07ab1
2021-03-27 09:32:29 +01:00
Amir Sarabadani
a4379d6fc9 Drop doInterwikiUpdate
This update is not being called in basically any wiki because it skips
when interwiki exists and that table was introduced in 1.2 (we don't
support direct upgrade from 1.26 or earlier).

The .sql file is not useful but installers use interwiki.list and that
is useful.

Bug: T272199
Bug: T273080
Change-Id: I0de40b8dc60eb07b9c7ebeb620142f3cdfe5b67b
2021-03-26 21:41:59 +01:00
Amir Sarabadani
0dacf7d68d Drop two 1.13 updates
- doCategoryPopulation is not needed nor being called anymore. There's
   not much use for the maintenance script either.
 - doPopulateParentId ditto.

Bug: T272199
Change-Id: Id7fc111b71e8ee9a37a3e2e56849ac5afeea9f9d
2021-03-26 21:34:00 +01:00
Ammar Abdulhamid
6a3aa5b5a2 Migrate page to abstract schema
Postgres:
 - Change page_namespace from smallint to int
 - Change page_random from numeric with arbitrary precision to float
 - Make page_touched not nullable

MySQL/SQLite:
 - Change datatype of page_title from varchar (with binary collation)
   to varbinary(255)
 - Drop default empty string from timestamp field of page_touched

Bug: T230428
Bug: T164898
Change-Id: Ibdaf332ea1da309d31d35a6ebbc1b8fefced335e
2021-03-21 12:07:12 +01:00
Amir Sarabadani
82ca60b9c0 Drop MysqlUpdater::doPageRandomUpdate()
It was introduced in 1.6 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: Ib2d9e749d636431a3817643507983d50987ab9a5
2021-03-18 10:33:36 +01:00
Amir Sarabadani
05aa875c30 Drop MysqlUpdater::doNamespaceSize()
It was introduced in 1.25 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: I57418500e22db27fc2b34ae76d22fc1858ce6530
2021-03-18 10:31:26 +01:00
Amir Sarabadani
c1c339d41e Drop convertLinks.php
This is only needed for upgrading from 1.3 which we don't support direct
upgrade from anymore (and I doubt anyone can run 1.3 now)

Bug: T272199
Change-Id: I3e5140c85265a7bfbe912fc0a40ada0eafcfb7c3
2021-03-18 10:18:38 +01:00
Amir Sarabadani
c2eca3b0ab Drop MysqlUpdater::doExtendCommentLengths() and its related sql file
It was introduced in 1.25 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: I6daf211baa688ad749a8c37ddd776736e598d316
2021-03-17 07:57:54 +01:00
Amir Sarabadani
5f7503b5a7 Drop MysqlUpdater::doIwlinksIndexNonUnique() and its related sql file
It was introduced in 1.22 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: I6cdedf33a9b94931e188177b3975b195ebd32111
2021-03-17 07:49:54 +01:00
Amir Sarabadani
810786fd21 Drop MysqlUpdater::doUserNewTalkTimestampNotNull() and its related sql file
It was introduced in 1.18 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: Ib66e9b7c197727bd87552486d7a8f8619ebb5b30
2021-03-15 09:56:44 +01:00
Amir Sarabadani
cbffebcb4d Drop MysqlUpdater::doClFieldsUpdate() and its related sql file
It was introduced in 1.17 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: Ia81fc68334c5c63d06d22cfea58eab644e12248d
2021-03-15 09:56:44 +01:00
Amir Sarabadani
eb51e14aaa Drop MysqlUpdater::doUpdateMimeMinorField() and its related sql file
It was introduced in 1.16 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: I11083df7f6399b44615f1b4e0b7815680cbc4ff1
2021-03-15 09:56:44 +01:00
jenkins-bot
bd98f44a0e Merge "Migrate archive table to abstract schema" 2021-03-14 05:53:19 +00:00
Amir Sarabadani
2cc79854e8 Migrate archive table to abstract schema
One of the last ones left.

For MySQL/Sqlite:
 - Dropping default of ar_timestamp, empty string is not a valid
   timestamp.
 - Changing ar_title from "varchar() binary" to varbinary

for Postgres:
 - Set default for ar_namespace and ar_title
 - Change datatype of ar_comment_id, ar_actor, ar_namespace
The indexes were fixed separately.

Bug: T230428
Bug: T164898
Bug: T42626
Depends-On: I83cf1cd51ac9cf933c9175cefd6e38a6914f3494
Change-Id: Ic1d13a82b27f7fa39a0f0ea9c5b7b193b007e4ab
2021-03-13 21:51:16 +01:00
Amir Sarabadani
c13c513aee Drop MysqlUpdater::doFilearchiveIndicesUpdate() and its related sql file
It was introduced in 1.13 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: Ieff17b99c881c2906fb71ebb7b9eac226c399b45
2021-03-13 19:41:27 +01:00
Amir Sarabadani
f9a322c38c Drop MysqlUpdater::doCategorylinksIndicesUpdate() and its related sql file
It was introduced in 1.11 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: I9ca3430fc0b20a4c275d1a2c6e8560baf75daac9
2021-03-13 19:35:53 +01:00
Amir Sarabadani
d1741f8991 Drop MysqlUpdater::doRestrictionsUpdate() and its related sql file.
It was introduced in 1.10 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

The other sql file has been removed in I982f9a7018069.

Bug: T272199
Change-Id: Ice40c6962dc558b8370fdbce04e51c0e1ece76ce
2021-03-12 11:43:47 +01:00
Amir Sarabadani
d29685aec0 Drop MysqlUpdater::doBacklinkingIndicesUpdate() and its related sql file
It was introduced in 1.9 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: Ib8a480cb570f16ae65e52912591e1d3f0c44aaf0
2021-03-12 11:43:41 +01:00
Amir Sarabadani
e1988c3eda Drop MysqlUpdater::doTemplatelinksUpdate() and its related sql file
It was introduced in 1.6 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: I71aaa4f282271cc9254257e2f2c7f892121870ad
2021-03-12 11:43:40 +01:00
Amir Sarabadani
335c06f7b6 Drop MysqlUpdater::doWatchlistNull() and its related sql file
It was introduced in 1.6 which we don't support direct upgrade from
anymore. Also it has been removed from update.php list and it's not
mentioned anymore.

Bug: T272199
Change-Id: I8d9565fe035faf96033dc207515b8ec21bca9fe6
2021-03-10 14:33:42 +01:00
Amir Sarabadani
de10282064 Drop MysqlUpdater::doUserGroupsUpdate()
This was introduced in 1.5 which we don't support direct upgrading
from anymore and it's already removed from wiring of the update.php.

Also removing related sql files as they are not used anywhere anymore.

Bug: T272199
Change-Id: Iffc8d2694113d56c3a97a4b72b29e5a30c6d43d1
2021-03-10 00:59:16 +01:00
jenkins-bot
19d671dcb4 Merge "Drop 1.27 upgrade patch files" 2021-03-09 11:08:06 +00:00
Ammarpad
2ca437dca9 Drop 1.27 upgrade patch files
6 files for Mysql/Sqlite/PG

Change-Id: Idef4906c5a7fdac2667c35bac7e8cc54629647f8
2021-03-09 07:15:37 +01:00
Amir Sarabadani
59af2e3132 Drop MysqlUpdater::doUserUniqueUpdate and its sql patch
This was introduced in version 1.5 which we don't support upgrading from
anymore and it's already removed from update.php checks.

Also dropping its related maintenance script which is not needed
anymore.

Bug: T272199
Change-Id: I5a755fd04f0e69880f27628fd805f865f4bc86bf
2021-03-08 17:17:55 +01:00
Amir Sarabadani
124bc610e0 Drop pagelinks table creation code
This was introduced in 2005 (1.5) and we don't support upgrade from that
version anymore (also it got removed from update.php runs as well). It's
good to go.

Bug: T272199
Change-Id: I5f7c08fce26ffa1e7b989528b0f450ce610ba744
2021-03-06 00:02:21 +01:00
jenkins-bot
6a7c6c820a Merge "Drop the cur/old -> page/revision schema change code" 2021-03-04 21:48:38 +00:00
Amir Sarabadani
e7df1e368b Add schema change for img_timestamp varbinary(14) to binary(14)
This is a follow up to I237af3558 where datatype of img_timestamp for
MySQL was changed from varbinary(14) to binary(14) as part of
standardizing timestamp fields in MySQL (T42626).

This change does not affect Postgres or Sqlite.

Bug: T42626
Bug: T230428
Change-Id: Ic4bd59736ff82d8bdb60fbac46a89f18257b8292
2021-03-04 21:18:21 +01:00
Amir Sarabadani
1053405664 Rename new_name_timestamp on recentchanges to rc_new_name_timestamp
To make it have a uniform prefix for index and column names

Bug: T270033
Change-Id: I8eb600416913092bd5aeb70389bba6e8a54d1d57
2021-03-01 19:00:52 +00:00
jenkins-bot
17fbc2856a Merge "Make rc_id unsigned" 2021-03-01 18:59:00 +00:00
Amir Sarabadani
da74e2139a Make rc_id unsigned
On very heavily edited wikis, it is possible for the value of signed
int to be too small. This increases the max value of rc_id from
2,147,483,647 to 4,294,967,295. It also makes it more consistent with
AUTO_INCREMENT PRIMARY KEY columns on other tables.

This patch doesn't apply to Sqlite or Postgres.

Bug: T62962
Change-Id: I3e2c1cf20004dcdeaf195611f762a8f6ffd2bff2
2021-03-01 16:57:41 +00:00
Reedy
16e31caa5a MysqlUpdater: Move iwlinks.iwl_prefix modification patch to 1.35
Was backported

Change-Id: I813bb31ef174808750a5373439255f45838a788d
2021-02-27 21:43:53 +00:00
Amir Sarabadani
c192b6c314 Drop the cur/old -> page/revision schema change code
This is a really old code that clearly should not be ran on a modern
system and already removed from update.php

Also, removing the code for doFixAncientImagelinks (leftover from
If99617c6c2)

Bug: T272199
Change-Id: I8a96343b6f7843d5d98308648bb2de9f8f0702c9
2021-02-27 21:35:28 +01:00
Amir Sarabadani
4a6d4baaed Migrate recentchanges table to abstract schema
This table is massive but thankfully we fixed most of its complexities
in previous patches.

For MySQL/Sqlite:
 - Change type of rc_title and rc_source from "varchar binary" to
   "varbinary"
 - Drop default of rc_timestamp
 - Change rc_timestamp from varbinary(14) to binary(14) to standardize
   timestamp datatypes

One index doesn't follow the uniform prefix rule but since it's in a
maintenance script, will fix that in a follow up.

Bug: T230428
Bug: T42626
Change-Id: I13994e02ad3a2293148346ef7be96746578ad854
2021-02-26 13:56:56 +01:00
Reedy
2290df4b6b Extend iwlinks.iwl_prefix to VARBINARY(32) on MySQL
Bug: T275242
Change-Id: I19252d2cd167832f7c429c31374e5e2dd3b89726
2021-02-25 01:49:36 +00:00
jenkins-bot
cf22176fdd Merge "Drop 1.25 updgrade patch files." 2021-02-18 06:29:51 +00:00
Ammarpad
e4852caaa3 Drop 1.25 updgrade patch files.
5 files for MySql/Sqlite/Postgres.

MysqlUpdater.php seems to have incorrect comment for 1.26 release
The hitcounter table was dropped in 1.25 (I0e5006a), so all the
files dropped here are part of schema change for 1.25.

Bug: T272199
Change-Id: I6a509a54d31f68e423b3d76d26259b1f88aa22bd
2021-02-17 18:09:08 +01:00
Reedy
f1a691c3ee MysqlUpdater::doUnsignedSyncronisation(): Increase grepability of filenames
Change-Id: Ia960fb7b945d6126e143b0ae8d856d0dc335e0d7
2021-02-13 21:49:38 +00:00
Reedy
00166857f4 MysqlUpdater::doLanguageLinksLengthSync(): Increase grepability of filenames
Change-Id: Iee5f26d33b28a7c4bb383f5610b58297dfd729dd
2021-02-13 20:41:47 +00:00