Completed
Push — 3.3.x ( 37d736...41194d )
by Erwan
02:32
created

remove_pagerank_conf   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 45
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A depends_on() 0 6 1
A update_data() 0 6 1
A revert_data() 0 6 1
A update_schema() 0 10 1
A revert_schema() 0 10 1
1
<?php
2
/**
3
 *
4
 * phpBB Directory extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2017 ErnadoO <http://www.phpbb-services.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace ernadoo\phpbbdirectory\migrations\v20x;
12
13
class remove_pagerank_conf extends \phpbb\db\migration\migration
14
{
15
	static public function depends_on()
16
	{
17
		return array(
18
			'\ernadoo\phpbbdirectory\migrations\v10x\v1_0_0',
19
		);
20
	}
21
22
	public function update_data()
23
	{
24
		return array(
25
			array('config.remove', array('dir_activ_pagerank')),
26
		);
27
	}
28
29
	public function revert_data()
30
	{
31
		return array(
32
			array('config.add', array('dir_activ_pagerank', '1')),
33
		);
34
	}
35
	
36
	public function update_schema()
37
	{
38
		return array(
39
			'drop_columns' => array(
40
				$this->table_prefix . 'directory_links'	=> array(
41
					'link_pagerank',
42
				),
43
			),
44
		);
45
	}
46
	
47
	public function revert_schema()
48
	{
49
		return array(
50
			'add_columns' => array(
51
				$this->table_prefix . 'directory_links'	=> array(
52
					'link_pagerank' => array('CHAR:2', ''),
53
				),
54
			),
55
		);
56
	}
57
}
58