+ /**
+ * 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" );
+ }
+