Passed
Push — master ( bc9a55...f3faba )
by Dark❶
07:56
created

unc_001_install::revert_schema()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * User Notification Control [UNC]. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2020, Dark❶, https://dark1.tech
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace dark1\usernotificationcontrol\migrations;
12
13
use phpbb\db\migration\migration;
14
15
class unc_001_install extends migration
16
{
17
18
	static public function depends_on()
19
	{
20
		return array('\dark1\usernotificationcontrol\migrations\unc_000_main');
21
	}
22
23
	public function update_schema()
24
	{
25
		return array(
26
			'add_tables'		=> array(
27
				$this->table_prefix . 'dark1_unc'	=> array(
28
					'COLUMNS'		=> array(
29
						'notification_sr_no'	=> array('UINT', null),
30
						'notification_method'	=> array('VCHAR:255', ''),
31
						'notification_type'		=> array('VCHAR:255', ''),
32
						'notification_value'	=> array('BOOL', 0),
33
					),
34
				),
35
			),
36
		);
37
	}
38
39
	public function revert_schema()
40
	{
41
		return array(
42
			'drop_tables'		=> array(
43
				$this->table_prefix . 'dark1_unc',
44
			),
45
		);
46
	}
47
}
48