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
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
This function was removed in abstracting interwiki table (Id652cb544)
and it's not needed anymore.
Change-Id: Ifc956ae91f8362e9872cd449fcab5cfb4870ec7f
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
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 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, 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
To get MySQL/SQLite migrated, changing type of cl_to and
cl_sortkey_prefix from "varchar() binary" to varbinary
For Postgres:
- Dropping foreign key on cl_from
- Setting proper default for cl_from, cl_to, cl_sortkey, cl_collation
- Set cl_sortkey to not nullable
- Dropping unique index cl_from which in turn should become PK
- Adding several missing indexes
- Fixing columns of cl_sortkey
Bug: T230428
Bug: T164898
Change-Id: I83043ef41f9c753734f1e4b51237d979031dd71a
Additional changes for Postgres:
- Set empty string as default for qci_type
- Set PG-equivalent of the given MySql/Sqlite timestamp as
default timestamp for qci_timestamp
- Make qci_type non nullable
- Make qci_timestamp non nullable
- Drop UNIQUE constraint on qci_type
Bug: T230428
Bug: T164898
Depends-On: If344395615087c360597a5b3d66ea03e930b7d9b
Change-Id: I741d2d079696d4b4eba09945341054d2a145bddc
In order to migrate MySQL and Sqlite to abstract schema changed the
iwl_title data type from varchar binary to varbinary. This wouldn't
affect production.
For migrating Postgres:
- Turning the unique index to PK to make it in sync with MySQL
Bug: T164898
Bug: T230428
Change-Id: Iaa625b66c874023b8cf2403917fa2fa120279208
In order to migrate MySQL and Sqlite to abstract schema changed the
ll_title data type from varchar binary to varbinary. This wouldn't
affect production.
For migrating Postgres:
- Dropping foreign key on ll_from
- Setting default of empty string for ll_lang and ll_title
- Make ll_lang and ll_title both non-nullable to be in sync with MySQL
- Turning the unique index to primary key, similar to MySQL
- Renaming an index to sync with MySQL
Bug: T164898
Bug: T230428
Change-Id: I57f22896ff67266f99bf08f6dd1b9cc4c51b1db9
This partialy reverts commit 9e9414db50.
DROP CONSTRAINT is part of ALTER TABLE in PostgreSQL, not a stadalone command.
Change-Id: Ifd1b4235ea3b94d130fa3a89739af68a6db820f7
Out of six PK SQL patches for Postgres, two of them were broken
because you can't put drop index inside alter table:
http://sqlfiddle.com/#!17/2acf44/1
One of them were caused by yours truly copying from the other one.
Also fixing file name in one the pk patches.
Noticed in I60a2b65d
Change-Id: If793ea61437d46adf3e05c38df4ad37bce81c5cf
Also, fixing two data type drifts in Postgres:
- lc_key was varchar (with no binary flag) in MySQL but TEXT in
Postgres while PG supports varchar. Changing PG to varchar.
- lc_value was BYTEA but the rest of varbinary fields are mapped to
TEXT, changing it to TEXT data type.
And fixing primary key of these tables in Postgres too as it was a unique index instead.
Bug: T198811
Bug: T164898
Bug: T230428
Change-Id: I50305556bd870461d05f98c5272cf1d6a65deb15
Also, dropping foreign key constraint on user_properties.up_user as it's decided to
drop all of foreign key constraints in T164898
And fixing primary key of the table in Postgres as it was a unique index
instead.
Bug: T198811
Bug: T164898
Bug: T230428
Change-Id: I60a2b65df62ec93a363309f8a17c29b83fd6f058
This table will store expiries for watchlist items, so that pages can be
automatically unwatched at a specific time.
Bug: T240094
Change-Id: I014ffccb91969e7a222a83858c55e71067b0f2af
Update the database schema so a block can be switched between a sitewide and
partial block. Also add the restrictions table for specifiying the partial
blocks.
Bug: T197144
Change-Id: I4a725312c4b980a1b14e5ca826069fa2278a5913
MySQL, SQLite, PostgreSQL and MSSQL done with transitional patches.
One additional duplicate index removed from PostgreSQL schema.
Having a PK is essential to do maintenance, specially on large tasks.
By not having a PK it is impossible to add it in a safe way if not done
directly on the master.
Having a PK means that we can easily change the PK into another one if
needed in the future. The ones we chose might not be the best ones, but
will allow us to get them changed.
Bug: T198811
Change-Id: I6b96a427687085c6c24bcd759c9739f81288b919
Table defining tag names for IDs. Also stores hit counts to avoid expensive queries on change_tag
See T185355 for more information
Bug: T193867
Bug: T185355
Change-Id: I4fd943589b3ed304471304c8beda15327a8edbcf
MediaWiki doesn't support PostgreSQL < 9.2, so drop the support for
older versions.
At the same time, since we're messing with the DatabasePostgres::insert()
code anyway, let's start using ON CONFLICT DO NOTHING for PG >= 9.5.
And since we're doing that, let's do the same for
DatabasePostgres::nativeInsertSelect().
Change-Id: I7bf13c3272917ebafeaff11eb116714a099afdf3
This should have been done long ago. Now it is being done.
This also changes ar_text_id to NOT NULL, since it should never be null
anymore, and DEFAULT 0 in preparation for MCR stopping writing it.
Bug: T33223
Change-Id: I18f1c740b7537c7dc3cfeba9b241d0a9f31caa34
Revisions deleted before MediaWiki 1.5 do not have a value in this
field. This is going to be a problem for migration to the MCR schema, so
provide a maintenance script to clean this up.
Then, for good measure, change the schema to make the field
non-nullable.
Bug: T182678
Change-Id: Ie2e11f12a30f379db32c3e074658012c6f93adb0
The site stats table holds a bunch of metric fields, two of which are of
data type "bigint unsigned", 3 are "bigint" (signed) and one is int
(signed). Also the default values differ widely: It is 0 on the
"unsigned" fields and the "int" field, but -1 on the three others. This
patch makes all of this more consistent:
Set all fields (except the ss_row_id, which isn't changed) data type to
"bigint unsigned". Also set NULL as the default value for all those
fields. Obviously -1 isn't a possible default value any more. Also, 0
can easily be mistaken for a real value (e.g. ss_active_users=0 -->
"there is nobody active on this wiki"). NULL, by it's definition, is the
value of choice for a value to insert into fields of which we don't know
a correct value.
The respective patch files were tested locally against MySql, Sqlite,
Postgres and SQL Server 2016. Neither oracle nor the upgrade with
update.php was tested.
Bug: T56888
Change-Id: I7d42aae434852a56b6f8dd559d8a5f3bce416021