update_sessions   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 32
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A depends_on() 0 6 1
A update_schema() 0 10 1
A revert_schema() 0 10 1
1
<?php
2
/**
3
 *
4
 * 2FA extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2015 Paul Sohier
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace paul999\tfa\migrations;
12
13
class update_sessions extends \phpbb\db\migration\migration
14
{
15
16
	static public function depends_on()
17
	{
18
		return array(
19
			'\phpbb\db\migration\data\v310\gold',
20
		);
21
	}
22
23
	public function update_schema()
24
	{
25
		return array(
26
			'add_columns'        => array(
27
				$this->table_prefix . 'sessions'        => array(
28
					'u2f_request'    => array('TEXT', null),
29
				),
30
			),
31
		);
32
	}
33
34
	public function revert_schema()
35
	{
36
		return array(
37
			'drop_columns'        => array(
38
				$this->table_prefix . 'sessions'        => array(
39
					'u2f_request',
40
				),
41
			),
42
		);
43
	}
44
}
45