X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Finstaller%2FOracleUpdater.php;h=00b96614f8f389394992da4177f4b1afc9f6605b;hp=e262eda635124f2b6d661ff50ec32363b0d45e44;hb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;hpb=d5a7166771613dfe4ed9fb75fa5efeced6134bd1 diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index e262eda635..00b96614f8 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -123,6 +123,9 @@ class OracleUpdater extends DatabaseUpdater { [ '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' ], @@ -273,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 */