X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FOracleUpdater.php;h=1f0e411af08ddc527b7641924d0f11841a1117b5;hb=2480aae0c97d822e10b50619e7b48b25c45af073;hp=e1e0d0f82d7ad32c3d40bc8e0bf2f8acf71db95e;hpb=bcd377cd008f8a8628ab727c3fa90090725d6c10;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index e1e0d0f82d..00b96614f8 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -119,6 +119,13 @@ class OracleUpdater extends DatabaseUpdater { [ 'addField', 'change_tag', 'ct_id', 'patch-change_tag-ct_id.sql' ], [ 'addField', 'tag_summary', 'ts_id', 'patch-tag_summary-ts_id.sql' ], + // 1.29 + [ 'addField', 'externallinks', 'el_index_60', 'patch-externallinks-el_index_60.sql' ], + [ 'addField', 'user_groups', 'ug_expiry', 'patch-user_groups-ug_expiry.sql' ], + + // 1.30 + [ 'doAutoIncrementTriggers' ], + // KEEP THIS AT THE BOTTOM!! [ 'doRebuildDuplicateFunction' ], @@ -269,6 +276,30 @@ class OracleUpdater extends DatabaseUpdater { $this->output( "ok\n" ); } + /** + * Add auto-increment triggers + */ + protected function doAutoIncrementTriggers() { + $this->output( "Adding auto-increment triggers ... " ); + + $meta = $this->db->query( 'SELECT trigger_name FROM user_triggers WHERE table_owner = \'' . + strtoupper( $this->db->getDBname() ) . + '\' AND trigger_name = \'' . + $this->db->tablePrefix() . + 'PAGE_DEFAULT_PAGE_ID\'' + ); + $row = $meta->fetchRow(); + if ( $row['column_name'] ) { + $this->output( "seems to be up to date.\n" ); + + return; + } + + $this->applyPatch( 'patch-auto_increment_triggers.sql', false ); + + $this->output( "ok\n" ); + } + /** * rebuilding of the function that duplicates tables for tests */ @@ -281,7 +312,7 @@ class OracleUpdater extends DatabaseUpdater { * * @param array $what */ - public function doUpdates( $what = [ 'core', 'extensions', 'purge', 'stats' ] ) { + public function doUpdates( array $what = [ 'core', 'extensions', 'purge', 'stats' ] ) { parent::doUpdates( $what ); $this->db->query( 'BEGIN fill_wiki_info; END;' );