To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 26e8d98e authored by vermeul's avatar vermeul
Browse files

schema updates for mysql and postgres

parent daaaec24
......@@ -981,11 +981,19 @@ EOT;
// Schema updates, called on Vagrant machine with: mwscript update.php
// otherwise: cd maintenance; php update.php
// creates the necessary tables for YATA.
public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $updater ) {
$updater->addExtensionTable( 'yata_annotation', __DIR__ . '/sql/yata_annotation.sql');
$updater->addExtensionTable( 'yata_category', __DIR__ . '/sql/yata_category.sql');
$updater->addExtensionTable( 'yata_annotation_category', __DIR__ . '/sql/yata_annotation_category.sql');
}
public static function onLoadExtensionSchemaUpdates( DatabaseUpdater $updater = null ) {
$map = [ 'mysql', 'postgres' ];
$type = $updater->getDB()->getType();
if ( !in_array( $type, $map ) ) {
throw new Exception( "YATA extension does not currently support $type database." );
}
$sql = __DIR__ . '/sql/yata.' . $type . '.sql';
$updater->addExtensionTable( 'yata', $sql );
return true;
}
// called right after «Save Changes»
// when an error is present, returns to edit page and prints the error
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment