Wikidata is at 51.3% of its maximum value (see [1]), so we still have
comfortable time to make this change, but it will inevitably be
necessary and there is no point in postponing this change into the
future. The autoincrement value will not get smaller. ¯\_(ツ)_/¯
Also since rc only stores stuff for 30 days, the table is not that
big.
[1] - https://grafana.wikimedia.org/d/79S1Hq9Mz/wikidata-reliability-metrics?viewPanel=29&orgId=1
Bug: T63111
Change-Id: Icf3dc9815814ef73aa6a39f1c221a349e6b76872
* Drop default value from rev_actor and rev_comment_id
* Make rev_id a bigint
Bug: T215466
Depends-On: I88318d7bcc063bc86a56eeb5f00048ea6e81964b
Change-Id: Id0a3d920e8b2dc8643fa3c0341b34ab3ed5761dc
After exhuastive research, we concluded that iwl_prefix_from_title is
not used and in case it's actually used, other indexes provide enough
cardinality.
This table is about to grow quite large in Commons, let's avoid making
it bigger than it needs to be.
Bug: T343131
Change-Id: I89e40dff384291968d2465e4109a3d212ae2f8c7
This table has eight indexes plus PK. It has around 1000 rows only. Even
if it needs these indexes (which it doesn't), they are still useless.
Looking at the code, the only potential useful index is the one on
site_global_key, they are showing up in the report of unused indexes in
the db and I checked with Fandom (which might benefit from an index on
this table) and they said they don't use sites table.
Bug: T342856
Change-Id: I06b3db0f33bd35bfa68f4b418d8c2f4b9b988409
Why:
* Part of a temporary user name is generated from an index that
increments, which is stored in the database.
* As specified in T345855, the index will be restarted each year.
* Also specified in T345855, the year will be included in
generated temporary user names.
What:
* Since the year must be included in the name in order to avoid
naming conflicts if the index is restarted each year, both are
implemented together and controlled by a single config.
* Add a new config option that, when true, restarts the name
generation index at the start of each year and add the year into
the user name: $wgAutoCreateTempUser['serialProvider']['useYear']
* Add a uas_year column to the user_autocreate_serial table, which
is unique in combination with uas_shard, so the index can be
stored for each shard/year combination.
* The year is added into the username just after the prefix, as
specified in T345855. This is based on research that having the
year near the start of the name aids understanding that the
names are not IP addresses. The position of the year within the
name is therefore not configurable (though whether to include
it is). See T345855 for the research.
Bug: T349494
Bug: T349501
Depends-On: I6b3c640a4e74f52fd4a4f46de5a2cbe80fe3b665
Change-Id: If51acb3f4efa361ce36d919c862a52501a5a7d24
Already dropped from production
Also dropping FixExtLinksProtocolRelative as it's not useful anymore and
it has been run in previous releases so it's not worth fixing.
Bug: T312666
Change-Id: I1dd6e704b34e685ada6e316da11243d10827d769
We need to drop these columns and we need to make them take default
values so we can issue write queries without these columns.
Also noting that MySQL prior to 8.0 can't set default values to blob
columns making this way more complicated than it should be but MariaDB
can set them (https://mariadb.com/kb/en/blob/). We also made these
columns nullable to make this work in MySQL.
Bug: T341828
Change-Id: I0d60742b6ce7adf642393ee00b66aa539b76dfc1
This allows temporary users to be identified from applications
external to MediaWiki, by the user table alone (without referring
to the $AutoCreateTempUser['matchPattern'] config).
Bug: T333223
Change-Id: I83c5ff42654164590fb0361c84e65a5315ddbda8
Given that we now have abstract schema, any schema produced for SQLite
will be produced specificly for SQLite, no need to do regex gymnastics
that are hard to understand, maintain and obviously prone to break.
Bug: T326181
Change-Id: I58741ff82460cfd9a350440d50b293ba67e3c939
These files are not needed anymore. Either because they are orphan now
and no updater will run these sql files.
Or they are maint scripts to migrate the data and that has been removed
in I5ff9630a65 and I84bd1d3dbe7
Change-Id: I00c49d8d649e3fa7641f3c57bf3ea4440ae542df
Per official policy, updates from versions older than two TLS releases
are not supported.
Finding the implicit marker is a bit tricky. The user might try to
upgrade from a really old version that doesn't have tag_summary table
and mistakenly think it's new and allow upgrade. So turning the check
logic into a boolean AND where it must be new enough to have
change_tag_def table AND new enough not to have tag_summary table.
Change-Id: I5ff9630a6539a587a47930847e108ac53757106f
Per official policy, updates from versions older than two TLS releases
are not supported.
We can drop more versions, given that 1.39 is LTS but to ease the
review, let's drop one release per patch
Change-Id: I84bd1d3dbe777909e30710fff5bcb655af9a4261
The day has gone. Still keeping the code as the schema changes are not
done in production but the data migration has been finished.
Bug: T299417
Change-Id: I906e069a63d1dae14924c72318b22b16244371d6
- schema change to allow tl_namespace and tl_title being empty
This is done by removing them from primary key. They don't need to be
nullable as they have default value.
- Make sure with WRITE_NEW, updater avoids writing to the old columns
Bug: T306674
Change-Id: I2b8a29043e952060e7a79b6a7a3d647d48cd16fb
I have updated user_editcount field to unsigned in
tables.json
This patch doesn't apply to Postgres.
Bug: T305340
Change-Id: I07a360944a10be9cc8ed8731c6286412294413a3
It makes it more consistent with AUTO_INCREMENT PRIMARY KEY columns on
other tables.
This includes ipblocks.ipb_parent_block_id and
ipblocks_restrictions.ir_ipb_id as well
This patch doesn't apply to Postgres.
Bug: T297208
Change-Id: I950aba63b2b226abbaf4010fbb51415bbff117f4
Add services and utilities for automatic creation of temporary user
accounts on page save, in order to avoid exposing the user's IP
address.
* Add $wgAutoCreateTempUser, for configuring the system
* Add TempUserConfig service, which interprets the config.
* Add TempUserCreator service, which creates users during page save as
requested by EditPage. With proxy methods to TempUserConfig for
convenience.
* Add table user_autocreate_serial. Table creation is necessary before
the feature is enabled but is not necessary before deployment of this
commit.
Bug: T300263
Change-Id: Ib14a352490fc42039106523118e8d021844e3dfb
The policy allows this and since 1.39 is going to be the next LTS
release, I think it is fine to do this now.
Change-Id: If426e0ee349252ccc0ba9c4222c7d6865ab57fa2
Part of normalizing it, note that the field must be nullable now and
that will change later.
Bug: T299418
Change-Id: Id543dfa20a153312f66d2f45a64ac23e7272dabe
This includes:
page_props.pp_page
page_restrictions.pr_page
ipblocks_restrictions.ir_value
These columns must hold all possible values from page.page_id,
which is an unsigned integer.
These patches doesn't apply to Postgres.
Bug: T297212
Change-Id: I789f19f4d52daeab08f3090771404d078f86d0b3
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
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
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
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
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
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
This was added in 1.14 and upgrading directly from there is no
longer supported (I95d80e3)
Bug: T272199
Change-Id: I3008d697907c7dd0e33afd69f9bd4765835e8654