# redirection/5.3.6/database/schema/233.php

Redirection, version 5.3.6. 18 lines.

- Page: https://pluginprobe.com/plugins/redirection/5.3.6/code/database/schema/233.php
- Raw: https://pluginprobe.com/plugins/redirection/5.3.6/raw/database/schema/233.php
- Modified: 2019-01-12T10:45:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/redirection/5.3.6/code/database/schema/233.php#L10-L20`.

```php
<?php

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

	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 );
	}
}

```
