to ease future maintenance work. The pattern for catching the right
CHECK constraint is admittedly vague but the order in which auto-created
CHECK constraints of a table is removed doesn't really matter assuming
the update is always completed before another update is applied. If
updates are run through Update.php, that should be always the case.
Furthermore eliminating a bug causing application of several patches each
time when running Update.php
Bug: 65757
Bug: 65813
Change-Id: Ic7fc3bd836241dce8f296237bbd80ed3e4d1ee0d
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I3595e9aac69ac42fbb74b0783fae0ad9bcc831aa
Can be kind of confusing for people to figure out why certain
updates didn't happen. I just had an irc conversation with
someone who didn't realize why their db wasn't fully updated.
Change-Id: I56223e70bdac8baaf079c28cbb1f0e20ef0336b8
- Removed double spaces
- Added space after if/switch/foreach
- Removed space on elseif
- Added space around parentheses
- Added newline at end of file
- Removed space before semicolon at end of line
Change-Id: Id40b87e04786c6111e6686d7f7eea1e588bdf37d
They can cause problems if, for example, the installation has hooks
for UserSaveSettings or UserSaveOptions that try to update a user page.
Change-Id: I31078678e8939c897b1357bcb77eb2d26f806f29
Bug: 47271
One class of errors left unaddressed: Class name "WebInstaller_Language"
is not in camel caps format. I think this can be changed, too, but I
wasn't able to quickly find out where class names are being created.
Change-Id: I920b0231db1b70b68c6c8907257c288a0e112668
There was a bad rebase on I96b4cfd4c02e9cbf46cc6a0499b87fb3b89020a0,
because it partically reverts Ice42a31dee1e6b41da4aa0a47e8786579382aff1
Bug: 44690
Change-Id: Iff2c8d3cb1a10da7cd0ab18ee189454761d7db6f
Squiz.WhiteSpace.LanguageConstructSpacing:
Language constructs must be followed by a single space;
expected "require_once expression" but found
"require_once(expression)"
It is a keyword (e.g. like `new`, `return` and `print`). As
such the parentheses don't make sense.
Per our code conventions, we use a space after keywords like
these. We appeared to have an unwritten exception for `require`
that doesn't make sense. About 60% of require/include usage
was missing the space and/or had superfluous parentheses.
It is as silly as print("foo") or return("foo"), it works
because keywords have no significance for whitespace between
it and the expression that follows, and since experessions can
be wrapped in parentheses for clarity (e.g. when doing string
concatenation or mathematical operations) the parenthesis
before and after basiclaly just ignored.
Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
Update.php is supposed to clear all localization caches. This
makes sure to clear the ResourceLoader's own message cache
as well.
Bug: 44524
Change-Id: I15ceb60f5e2e4d3ed9ba818fe6cd619f9adce5b2
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays
Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
As calling $updater->modifyField will do the action immediately (not queued),
this may be undesired.
So this is a shortcut/utility function like addExtensionField/addExtensionTable etc,
instead of the developer calling addExtensionUpdate( array() ) themselves.
Change-Id: Ie94f2b42679062c6e106ae560faab26818a9b15c
- Add doTable() check at the top of renameIndex()
- Return true instead of false when aborting an update due to unfulfilled
condition; false is only to be used for updates that will be written to
a schema update file to be run later
Also removed the return false from addIndex() for consistency
- Break long line
Change-Id: I2efb6e3af4703ed8afeb315e8cda774d9a6c4a32
- DatabaseUpdater::dropExtensionIndex( $tableName, $indexName, $sqlPath )
- DatabaseUpdater::renameExtensionIndex( $tableName, $oldIndexName, $newIndexName, $sqlPath, $skipBothIndexExistWarning = false )
[ Case use ]
This feature is required to help extensions schema change to ensure
compatibility with SQLite.
First extensions to use it will be Echo and Flagged Revisions.
Change-Id: Ia2782d644593ab6b64b67720ed61b3994db10346
This might not be quite right... We might want to cache the result of apply patch, insert the row and then return the result...
Change-Id: Ie6a1bb16d2912ad43aa8fd45b2bf10a8bf8652ae
Change I96b4cfd4 changed the data being stored in updatelog, trying to
store the mangled parameters (which may included an added copy of the
DatabaseUpdater object itself) instead of the input parameters. This
causes warnings because database objects cannot be effectively
serialized.
Go back to storing the original input parameters instead.
Change-Id: I96e6dffed98772ebb9b812773ff2f608e7e40cb1
Allows update.php to be run when $wgAllowSchemaUpdates = false.
This is useful for non-WMF environments where strict DB permissions
allow database updates (which update.php performs), but no schema
changes (such as adding or dropping tables or indices which update.php
also performs).
It does this by adding the --schema and --noschema flags. Without
either of these flags, update.php will perform exactly as before.
With --noschema, all changes to the table structure or table additions
are skipped. Only data changes are made.
With --schema is used, no schema changes are made to the database, but
the schema changes are saved to a separate SQL file that can be run.
Change-Id: I96b4cfd4c02e9cbf46cc6a0499b87fb3b89020a0
It makes a whole lot more sense to run this at the end of the
update process after post update maintenance rather than just
at the end of schema updates.
Run update.php more than once so all the updatelog entries
are populated and you'll see why it makes sense.
Change-Id: Ice42a31dee1e6b41da4aa0a47e8786579382aff1
This allows sha1 searches with the api in miser mode for deleted files
Added script to populate the rows
Adding new field to selects and handle it in all places, where needed
Using a 10 byte index for the new field per
http://lists.wikimedia.org/pipermail/wikitech-l/2012-September/063429.html
Change-Id: Ie54a513fe361202e63df44be44a0fdd91926c974
The parent class LoggedUpdateMaintenance of each update script is
checking the updatelog self.
Checking in update.php prevents the script to be run, when using --force
on update.php and updater is not outputting a skipped message
Change-Id: I6cdad807ee4e49983cedef168d4e697a5bd8b7e7
Removed left over uses of dirname( __FILE__ ) to __DIR__, even in comments.
Running the PHP version test in maintenance/Maintenance.php earlier, so that
we no longer have to stay PHP < 5.3 compatible in there.
Change-Id: I5a00bd5c6af44b7f826c4e5576a7b3de7b5026d8
* PostgresField now reports column default value
* DatabasePostgres::indexAttributes reports index
details
* Perform schema update in one transaction
With this change we can sucessfully update
MediaWiki 1.7.3 schema to trunk^Wmaster
Patch set 2: Rebased against master. PLEASE check carefully
to make sure I got those conflicted files right.
Conflicts:
includes/db/DatabasePostgres.php
includes/installer/PostgresUpdater.php
Change-Id: Iebb6855e8f6f44470bbb1dc5ab9ac1abb513adfe
site_stats updated is still a database action.
Purge cache is now the very last one.
Output:
<snip>
...site_stats is populated...done.
Purging caches...done.
Done.
The user_options migration messages were not prefixed with '...' and
were split on several lines. This patch make the output messages more
inline with the existant ones.
Follow-up r103917
. <-- that is a patch of ink sorry. ><OO>