Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7491178
CreateTablesTask.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
894 B
Referenced Files
None
Subscribers
None
CreateTablesTask.php
View Options
<?php
namespace
MediaWiki\Installer\Task
;
use
MediaWiki\Status\Status
;
/**
* Create core tables
*
* @internal For use by the installer
*/
class
CreateTablesTask
extends
Task
{
public
function
getName
()
{
return
'tables'
;
}
public
function
getDependencies
()
{
return
'schema'
;
}
public
function
execute
():
Status
{
$status
=
$this
->
getConnection
(
ITaskContext
::
CONN_CREATE_TABLES
);
if
(
!
$status
->
isOK
()
)
{
return
$status
;
}
$conn
=
$status
->
getDB
();
if
(
$conn
->
tableExists
(
'archive'
,
__METHOD__
)
)
{
$status
->
warning
(
"config-install-tables-exist"
);
return
$status
;
}
$status
=
$this
->
applySourceFile
(
$conn
,
'tables-generated.sql'
);
if
(
!
$status
->
isOK
()
)
{
return
$status
;
}
// TODO Make this optional, not every DB type has a tables.sql file.
$status
->
merge
(
$this
->
applySourceFile
(
$conn
,
'tables.sql'
)
);
return
$status
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 19:21 (6 d, 4 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fd/a3/aa41f5cfd324fc67f72d15da63a5
Default Alt Text
CreateTablesTask.php (894 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment