| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add modifyFieldIfNullable, to run a patch if a field is nullable
* Add modifyTableIfFieldNotExists, to run a patch if a field is absent.
GlobalBlocking needs these to update a fields on a virtual domain. The
updates are potentially destructive on SQLite and there is no updatelog.
Also fix table prefix handling in DatabasePostgres::fieldInfo(),
necessary to make GlobalBlocking tests pass with this change.
Show more verbose output from modifyTable.
Change-Id: I61910dba894c164bebb880aa6af39cc534bd64c5
|
|
|
|
|
|
|
|
|
|
| |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: I9e5330601ded043ad24a99932fe3fa0ea6c427aa
|
|
|
|
| |
Change-Id: I7d3d7f759fadf76d9dbcecaf478cf53dc9203bf9
|
|
|
|
|
|
|
| |
The RandomPage alias was dropped in an earlier commit, so
group the release note entry in with these.
Change-Id: I207d7463ced1a1bb8b8ac749eba175fc0037a217
|
|
|
|
| |
Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also fix callers that were checking for t/f.
In CASE and COALESCE expressions, using 't' and 'f' did actually work,
because those literals have an unknown type and the other argument is
boolean, so PG coerces them to boolean. But it seems safer and clearer
to use the strongly typed literals TRUE and FALSE.
Bug: T352229
Change-Id: Ia01b76d3d6d2e048feac8e3118d9faff63a9ac56
|
|
|
|
|
|
|
|
| |
Change type bool in union types to false where true is not allowed
Add false to DatabaseSqlite::getFulltextSearchModule
Change-Id: I1199b261c4e5c3f6ff184c756f46f2650b16b0c9
|
|
|
|
|
| |
Bug: T299471
Change-Id: I5acae5e72de2f85fd6e68e391297895c86ffb10e
|
|
|
|
|
|
| |
Plus fix a typo
Change-Id: I8ca326990559ea80254ce0cef2ed204590716679
|
|
|
|
|
|
|
|
|
| |
These are no longer necessary, with abstract schema, the table
names should now be in sync with the names used in MySQL/SQlite.
Postgres-reserved identifiers need to be quoted where necessary.
Bug: T164898
Change-Id: I3bb11a021062d062ca645291c3c82cc318886bd9
|
|
|
|
| |
Change-Id: I271362623760be8d3aa3cffa84026e72c5d1b52a
|
|
|
|
| |
Change-Id: I0c3f8ce7fddfa6886413cdaf1edc236c4dfff44e
|
|
|
|
| |
Change-Id: Id3c88257e866923b06e878ccdeddded7f08f2c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up 4d10bb14e81 and 807d793ab9079.
According to codesearch [0], these were the last usages. Note that this
patch leaves two constants in places, IDatabase::DBO_SYSDBA and
DBO_DDLMODE. These are public constants used "mostly for oracle" according
to the docs, but maybe we could find other use cases in the future (?).
[0] - https://codesearch.wmflabs.org/core/?q=oracle%7Cmssql&i=fosho&files=%5C.%5B%5Ej%5Cd%5D%7Cen%5C.json&repos=
Bug: T230418
Change-Id: Ibfb748b4b23b885a77f4de161af4bf2ab9649a89
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PostgreSQL v12 will remove the long-deprecated column
pg_attrdef.adsrc. The supported way to introspect into column
default values is pg_get_expr(adbin, adrelid), which works
back through all versions of PostgreSQL supported by wikimedia.
Changing to the supported method will allow the upcoming v12 of the
database to be used while maintaining compatibility with older
versions, without needing to write version-specific code.
This patch has been tested with maintenance/update.php and
with phpunit in PostgreSQL versions 9.2, 11, and 12dev. It does
not harm the first two, and fixes errors that would otherwise
arise in the dev version. All unit tests which pass under version
11 now pass under 12dev as well.
Change-Id: I874d347fd286b26773113d4f0c6c30d9a4055ad3
|
|
|
|
|
|
| |
Found by PHPStan.
Change-Id: I95813b0db9a3d6ca8c3894e5ccba00a9dc84b336
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
|
|
|
|
|
| |
Bug: T195576
Change-Id: I10cd8415891bfe4a278eee06c9cfe905b3e036dc
|
|
|
|
|
|
|
|
| |
PostgreSQL puts temporary tables and such in a hidden, per-connection
"schema" that's checked for unqualified table accesses before the normal
search_path. We should check that in all the schema-checking functions.
Change-Id: I1194ac31f31133b177f624138afee19d00e454b9
|
|
|
|
| |
Change-Id: I52bef87512f9ddd155d1f4cc0052f6b7a0db5b42
|
|
|
|
|
|
| |
Blob, Field, DatabaseBase are now auto-detected.
Change-Id: Ib8fae2ec3fbb3f5e4aca7965f81631c5f0485ea1
|
|
|
|
|
|
| |
Update core callers and leave a class alias to \Field.
Change-Id: I4908282301d5de2a20baafe510557bd2c3867de5
|
|
|
|
|
|
|
| |
Performed using
find . -name \*.php -exec sed -i -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' {} \;
Change-Id: I5d0627f94c73690cf3a8a453539c22c760c2aa60
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove redundant schema prefix from relname=x query. The
schema filtering is already done via the JOIN. The relname
portion is just the table name not <schema>.<table name>.
* Avoid explicit table schema qualification and rely on the
search path, as MW 1.27 did. Previously it only used the
global $wgDBschema var to pass to determineCoreSchema()
instead of keeping it in mSchema.
* Clean up some code duplication in Database::tableName() and
make the code comments clearer.
* Make DatabasePostgres::tableName() use parent::tableName()
instead of a method that just wraps this method. The intent
seems clearer this way.
* Remove unused return value in
PostgresUpdater::rebuildTextSearch().
Bug: T148628
Change-Id: Id11d9576b7c2fdad22ff7f90727c12997217a632
|
|
|
|
|
|
| |
Fixed all IDEA warnings in the postgres classes too.
Change-Id: I06b4c5b2c581fb65552d980cc106aa10fed40285
|
|
Change-Id: I0724f1acce4f6c43b1f0983fa119e628e7c53ba5
|