Completed
Push — master ( b9932d...5e979e )
by Erwan
10s
created

drop_columns   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A depends_on() 0 6 1
A update_schema() 0 13 1
A revert_schema() 0 13 1
1
<?php
2
/**
3
*
4
* @package Quick Title Edition Extension
5
* @copyright (c) 2015 ABDev
6
* @copyright (c) 2015 PastisD
7
* @copyright (c) 2015 Geolim4 <http://geolim4.com>
8
* @copyright (c) 2015 Zoddo <[email protected]>
9
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
10
*
11
*/
12
13
namespace ernadoo\qte\migrations\v200;
14
15
class drop_columns extends \phpbb\db\migration\migration
16
{
17
	static public function depends_on()
18
	{
19
		return array(
20
			'\ernadoo\qte\migrations\v200\convert_old_permissions',
21
		);
22
	}
23
24
	public function update_schema()
25
	{
26
		return array(
27
			'drop_columns'    => array(
28
				$this->table_prefix . 'topics_attr'	=> array(
29
					'attr_auths',
30
				),
31
				$this->table_prefix . 'forums'	=> array(
32
					'hide_attr',
33
				),
34
			),
35
		);
36
	}
37
38
	public function revert_schema()
39
	{
40
		return array(
41
			'add_columns'    => array(
42
				$this->table_prefix . 'topics_attr' => array(
43
					'attr_auths'    => array('MTEXT', ''),
44
				),
45
				$this->table_prefix . 'forums' => array(
46
					'hide_attr'    => array('TEXT', ''),
47
				),
48
			),
49
		);
50
	}
51
}
52