X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Finstaller%2FOracleUpdater.php;h=040b54a1240fe03bc6f8091f90f8e2ed8c6e0885;hp=e262eda635124f2b6d661ff50ec32363b0d45e44;hb=5120937028f768749d058aa91dde82a96de0af1c;hpb=b170b4a14a94fb509c4b15ca4c5717c6976a32cc diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index e262eda635..040b54a124 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -123,6 +123,10 @@ 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' ], + [ 'addIndex', 'site_stats', 'PRIMARY', 'patch-site_stats-pk.sql' ], + // KEEP THIS AT THE BOTTOM!! [ 'doRebuildDuplicateFunction' ], @@ -273,6 +277,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 */