rsi_001_install   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 10
c 1
b 0
f 0
dl 0
loc 24
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A depends_on() 0 3 1
A revert_schema() 0 6 1
A update_schema() 0 6 1
1
<?php
2
/**
3
 *
4
 * Reduce Search Index [RSI]. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2020-forever, Dark❶, https://dark1.tech
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace dark1\reducesearchindex\migrations;
12
13
/**
14
 * @ignore
15
 */
16
use phpbb\db\migration\migration;
17
18
/**
19
 * Migration stage 001 : Install
20
 */
21
class rsi_001_install extends migration
22
{
23
	static public function depends_on()
24
	{
25
		return ['\dark1\reducesearchindex\migrations\rsi_000_main'];
26
	}
27
28
	public function update_schema()
29
	{
30
		return [
31
			'add_columns'	=> [
32
				$this->table_prefix . 'forums'	=> [
33
					'dark1_rsi_f_enable'	=> ['TINT:1', 0],
34
				],
35
			],
36
		];
37
	}
38
39
	public function revert_schema()
40
	{
41
		return [
42
			'drop_columns'	=> [
43
				$this->table_prefix . 'forums'	=> [
44
					'dark1_rsi_f_enable',
45
				],
46
			],
47
		];
48
	}
49
}
50