• File: 233.php
  • Full Path: /home/mrjeffgoldman/public_html/kensingtonsearch.net/wp-content/plugins/redirection/database/schema/233.php
  • Date Modified: 08/18/2026 9:57 AM
  • File size: 606 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

// Note: not localised as the messages aren't important enough
class Red_Database_233 extends Red_Database_Upgrader {
	/**
	 * @return array<string, string>
	 */
	public function get_stages() {
		return [
			'fix_invalid_groups_233' => 'Migrate any groups with invalid module ID',
		];
	}

	/**
	 * @param \wpdb $wpdb
	 * @return bool
	 */
	protected function fix_invalid_groups_233( $wpdb ) {
		$this->do_query( $wpdb, "UPDATE {$wpdb->prefix}redirection_groups SET module_id=1 WHERE module_id > 2" );

		$latest = Red_Database::get_latest_database();
		return $latest->create_groups( $wpdb );
	}
}