Page MenuHomeWickedGov Phorge

CreateTablesTask.php
No OneTemporary

Size
934 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 {
/** @inheritDoc */
public function getName() {
return 'tables';
}
/** @inheritDoc */
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
Aug 16 2026, 12:52 (13 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a1/ff/8724e9e5551c4a259e5e36c35c4f
Default Alt Text
CreateTablesTask.php (934 B)

Event Timeline