$this->extensionUpdates[] = array( 'addTable', $tableName, $sqlPath, true );
}
+ /**
+ * @param $tableName string
+ * @param $indexName string
+ * @param $sqlPath string
+ */
+ public function addExtensionIndex( $tableName, $indexName, $sqlPath ) {
+ $this->extensionUpdates[] = array( 'addIndex', $tableName, $indexName, $sqlPath, true );
+ }
+
+ /**
+ * @param $tableName string
+ * @param $columnName string
+ * @param $sqlPath string
+ */
+ public function addExtensionField( $tableName, $columnName, $sqlPath ) {
+ $this->extensionUpdates[] = array( 'addField', $tableName, $columnName, $sqlPath );
+ }
+
/**
* Get the list of extension-defined updates
*
return $this->extensionUpdates;
}
+ /**
+ * @return array
+ */
public function getPostDatabaseUpdateMaintenance() {
return $this->postDatabaseUpdateMaintenance;
}
$this->updates = array_merge( $this->updates, $updates );
}
+ /**
+ * @param $version
+ * @param $updates array
+ */
protected function setAppliedUpdates( $version, $updates = array() ) {
$this->db->clearFlag( DBO_DDLMODE );
if( !$this->canUseNewUpdatelog() ) {
* Obviously, only use this for updates that occur after the updatelog table was
* created!
* @param $key String Name of the key to check for
+ *
+ * @return bool
*/
public function updateRowExists( $key ) {
$row = $this->db->selectRow(
* $wgExtNewTables/Fields/Indexes. This is nasty :) We refactored a lot
* of this in 1.17 but we want to remain back-compatible for a while. So
* load up these old global-based things into our update list.
+ *
+ * @return array
*/
protected function getOldGlobalUpdates() {
global $wgExtNewFields, $wgExtNewTables, $wgExtModifiedFields,