Completed
Push — master ( 19e6d7...ac4293 )
by Tobias
24s
created

update_0_3_0::update_schema()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 12
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 12
loc 12
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * @package phpBB Extension - Wiki
5
 * @copyright (c) 2016 tas2580 (https://tas2580.net)
6
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
 *
8
 */
9
10
namespace tas2580\wiki\migrations;
11
12 View Code Duplication
class update_0_3_0 extends \phpbb\db\migration\migration
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
	public static function depends_on()
15
	{
16
		return array(
17
			'\tas2580\wiki\migrations\initial_module',
18
			'\tas2580\wiki\migrations\update_0_1_2',
19
			'\tas2580\wiki\migrations\update_0_2_0',
20
		);
21
	}
22
23
	public function update_data()
24
	{
25
		return array(
26
			array('permission.add', array('u_wiki_set_sticky', true, 'm_')),
27
		);
28
	}
29
30
	public function update_schema()
31
	{
32
		return array(
33
			'add_columns' => array(
34
				$this->table_prefix . 'wiki_article' => array(
35
					'article_sticky'		=> array('BOOL', null),
36
					'article_views'			=> array('UINT', null),
37
					'article_redirect'		=> array('VCHAR:255', ''),
38
				),
39
			),
40
		);
41
	}
42
}
43