Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4164094
UpdateTables.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
UpdateTables.php
View Options
<?php
namespace
MediaWiki\Extension\OATHAuth\Hook
;
use
MediaWiki\Extension\OATHAuth\Maintenance\MoveRecoveryCodesFromTOTP
;
use
MediaWiki\Extension\OATHAuth\Maintenance\UpdateForMultipleDevicesSupport
;
use
MediaWiki\Installer\DatabaseUpdater
;
use
MediaWiki\Installer\Hook\LoadExtensionSchemaUpdatesHook
;
class
UpdateTables
implements
LoadExtensionSchemaUpdatesHook
{
/**
* @param DatabaseUpdater $updater
*/
public
function
onLoadExtensionSchemaUpdates
(
$updater
)
{
$type
=
$updater
->
getDB
()->
getType
();
$baseDir
=
dirname
(
__DIR__
,
2
);
$typePath
=
"$baseDir/sql/$type"
;
$updater
->
addExtensionUpdateOnVirtualDomain
(
[
'virtual-oathauth'
,
'addTable'
,
'oathauth_types'
,
"$typePath/tables-generated.sql"
,
true
]
);
// Ensure that the oathauth_users table is up-to-date if it exists, so that the migration
// from the old schema to the new one can be done properly.
if
(
$updater
->
tableExists
(
'oathauth_users'
)
)
{
// 1.41
$updater
->
addExtensionUpdateOnVirtualDomain
(
[
'virtual-oathauth'
,
'runMaintenance'
,
UpdateForMultipleDevicesSupport
::
class
,
]
);
$updater
->
addExtensionUpdateOnVirtualDomain
(
[
'virtual-oathauth'
,
'dropTable'
,
'oathauth_users'
]
);
}
// 1.45
$updater
->
addPostDatabaseUpdateMaintenance
(
MoveRecoveryCodesFromTOTP
::
class
);
// add new updates here
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 20 2026, 02:24 (10 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1c/51/950cf6b02f838bb4adafadc47854
Default Alt Text
UpdateTables.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment