Passed
Branch 3.2.x (99ec7e)
by Mario
04:20
created

v320_m5_update_schema   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A revert_schema() 0 5 1
A depends_on() 0 3 1
A update_schema() 0 6 1
1
<?php
2
/**
3
 *
4
 * PayPal Donation extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2015 Skouat
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace skouat\ppde\migrations\v32x;
12
13
class v320_m5_update_schema extends \phpbb\db\migration\migration
14
{
15
	/**
16
	 * @inheritDoc
17
	 */
18
	public static function depends_on()
19
	{
20
		return array('\skouat\ppde\migrations\v32x\v320_m4_update_schema');
21
	}
22
23
	/**
24
	 * @inheritDoc
25
	 */
26
	public function update_schema()
27
	{
28
		return array(
29
			'add_columns' => array(
30
				$this->table_prefix . 'ppde_txn_log' => array(
31
					'txn_errors_approved' => array('BOOL', 0),
32
				),
33
			),
34
		);
35
	}
36
37
	/**
38
	 * @inheritDoc
39
	 */
40
	public function revert_schema()
41
	{
42
		return array(
43
			'drop_columns' => array(
44
				$this->table_prefix . 'ppde_txn_log' => array('txn_errors_approved'),
45
			),
46
		);
47
	}
48
}
49