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
For MySQL/Sqlite:
- Nothing
For Postgres:
- Introduce the table. It's not used but it'll be used in the future (T220450)
Bug: T164898
Bug: T230428
Bug: T220450
Change-Id: I9f33132676344f8cd813f7a438b3a6a078fd281c
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
Postgres:
- Rename the table from `mwuser` to `user`
- Transition user_id from int to serial
- Make user_token not nullable and add default
- Make user_real_name not nullable and add default
- Make user_email not nullable
- Make user_newpassword not nullable
- Make user_password not nullable
- Drop UNIQUE contraint on user_name and add default
MySQL/SQLite:
* No changes
Bug: T164898
Bug: T230428
Change-Id: I746714f7b3ae16f9625f97bcca84280fcd8b61a0
This was introduced in r103367 as a follow up to r103365 while none of
the commits wire this to update.php and since then it has been unused.
And even if it was wired dynamically somehow that I missed, it's not
needed anymore as we don't support direct upgrades from these versions
(1.18 and 1.19) anymore.
Change-Id: I1e16de398bbe61adcb55787117378ea96a2b3e9f
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
Probably nobody is using these.
Also hopefully after fully migrating to abstract schema, there'd
not be any more unnecessary drifts between MySQL and Postgres tables,
obsoleting the need for compare_schema.pl
For mysql2postgres.pl, dumpBackup.php/importDump.php can be used.
Bug: T258876
Change-Id: Ief36bca6f3a387f811408f2a5e4840656dfffff2
There's no reason to keep schema change that's no longer useful.
History is already tracked by git.
Change-Id: Ia8aa0d21ae5f2d799d9a641ebe7b924f56e07ab1
These are from versions we don't support direct upgrade anymore and they
are already removed from update.php wiring.
Bug: T272199
Change-Id: I863d91d7d620943571cb8bb22f663c2efbbd0821
These changes to tsearch functions were introduced in 2010 in a version
that we definitely don't support direct upgrades from.
Bug: T272199
Change-Id: I47c4054552daad55c0e13eec36865706ee6d1903
Added new index: 'rev_page_timestamp' (the corresponding index
in MySQL is currently 'page_timestamp' but it will soon be
renamed to have the rev_ suffix as part of T270033).
Rename rev_timestamp_idx and revision_unique to match names
that are in use for MySQL
Bug: T230428
Bug: T164898
Change-Id: I3a79a892673b073cea57ee4e397b2963c7cef2f1
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
This function was removed in abstracting interwiki table (Id652cb544)
and it's not needed anymore.
Change-Id: Ifc956ae91f8362e9872cd449fcab5cfb4870ec7f
This is to make the migrating this table to abstract schema easier.
And reduce schema drifts between postgres and mysql.
Bug: T230428
Bug: T164898
Change-Id: I97a8791283e2499a559f1debb9b3c66909069283
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 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
I checked all of them with https://github.com/wikimedia/mediawiki/blob/REL1_26/includes/installer/PostgresUpdater.php
using a script and all of them except one are old and have
not been added after 1.26. The only left is actually added but changed
in the mean time and is needed.
Also cleaning up checkIwlPrefix that was introduced in 1.17.
Bug: T272199
Change-Id: Ifc58c8d860ebc0e6d154203cafc6a64654bced92
To make abstracting this table easier. Reducing the schema drift between
schema of this table in PG and MySQL:
- Changing datatype of four fields
- Set default for seven fields
- Change nullability of two fields.
Bug: T230428
Bug: T164898
Change-Id: Id6fa9fd1ebf840f6354fcd8b8ebf0e393ba9e624
These are not clearly marked per release as they're in MysqlUpdater
until we reach 1.23 release, and I am not sure whether they're truly
in chronological order. Some of the files dropped here exists for Mysql
and here is there corresponding versions there, the rest do not exist
there.
* patch-page_restrictions.sql --1.10
* patch-protected_titles.sql --1.12
* patch-page_props.sql --1.13
* patch-category.sql --1.13
* patch-updatelog.sql --1.13
* patch-change_tag.sql --1.15
* patch-user_properties.sql --1.16
* patch-log_search.sql --1.16
* patch-l10n_cache.sql -- 1.16
* patch-iwlinks.sql -- 1.17
* patch-module_deps.sql -- 1.17
* patch-uploadstash.sql -1.18
* patch-user_former_groups.sql --1.18
* patch-sites.sql --1.21
These have no corresponding files
* patch-querycachetwo.sql
* patch-redirect.sql
Bug: T272199
Change-Id: I42830ffe8eb3ccad9b1f55d9f2629b388806335b
For MySQL/Sqlite:
- Change datatype of img_name from "varchar() binary" to varbinary.
- Drop default of img_timestamp
For Postgres:
- Adding two missing indexes.
- Renaming two indexes
- Setting default value for five fields
- Fix data type of four fields
- Drop default of img_metadata
- Make three fields not nullable
Bug: T230428
Bug: T164898
Change-Id: I237af3558b0e1c1fecd874c3c90ba6780e50aaa4
For Sqlite and MySQL, renaming name_title_timestamp to
ar_name_title_timestamp so it follows the database convention.
For Postgres:
- Rename archive_name_title_timestamp to ar_name_title_timestamp
- Drop archive_actor (that has only ar_actor)
- Add ar_actor_timestamp (that has ar_actor, ar_timestamp)
This fixes drifts of PG and MySQL and makes work for abstracting the
table easier.
Bug: T230428
Bug: T164898
Change-Id: I123a4c47602bdd415f0fe5823f96159dcd0d84b8
For MySQL/Sqlite:
- Drop default values of ipb_timestamp and ipb_expiry as part of
standardizing timestamp columns
For Postgres:
- Drop foreign key on two columns as approved by the RFC
- Set default of ipb_user
- Make three columns not nullable to sync with MySQL
- Change data type of two columns to BIGINT to be the same as MySQL
Bug: T230428
Bug: T164898
Bug: T42626
Change-Id: I2c5303d76c6ce059d7fef324a4521c6336c5b1f3
For Postgres:
- Drop Unique constraint on `keyname` and make primary key
- Change type of `value` from BYTEA to TEXT and drop its default
- Make `value` nullable to sync with MySQL/SQLite
MySQL:
- Change exptime from DATETIME to TIMESTAMP
MySQL/SQLite:
- Make 'exptime' not nullable
Bug: T230428
Bug: T164898
Change-Id: Iab9de8a1bb2cb01b6e3e69e66f1bbe089d53d0a7
For MySQL/Sqlite:
- Changing oi_name and oi_archive_name to varbinary instead of "varchar
binary"
- Dropping default from oi_timestamp
For Postgres:
- Adding the correct default to seven fields
- Removing incorrect default from oi_metadata
- Add missing index oi_actor_timestamp
- Change four fields to have correct data type
- Make oi_major_mime and oi_minor_mime not nullable
- Drop foreign key on oi_name
Bug: T230428
Bug: T164898
Change-Id: I4dff0e48081a5797a29513f9c8b87f9ffcaadb5d
For MySQL/Sqlite, drop the table options, they are for MySQL < 5.0 which
was released in 2003 and not any use today.
For Postgres, rename pagecontent table to text, approved as part of the
RFC. Swap order of creating auto-generated tables and manual tables.
Bug: T230428
Bug: T164898
Change-Id: Id7510b80beed7a7297353094a57d5e2d4f12fc64
'TIMESTAMPTZ' is an alias for the canonical name of the data type
'TIMESTAMP(0) WITH TIME ZONE' which though descriptive, looks rather
convoluted. Let's use the alias for consistency throughout.
Bug: T230428
Follow-up: Iabbe8f085812acd90536a06fee2ecd4db9b047d5
Change-Id: I277658b1ebd851466022e7874579cf507684d40a