Page MenuHomeWickedGov Phorge

CreateTablesTask.php
No OneTemporary

Size
894 B
Referenced Files
None
Subscribers
None

CreateTablesTask.php

<?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

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)

Event Timeline