Completed
Push — master ( b4956d...e33aad )
by Matt
03:29 queued 02:00
created

install_1_2_0::effectively_installed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * Database Optimize & Repair Tool
5
 *
6
 * @copyright (c) 2013, 2019 Matt Friedman
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace vse\dbtool\migrations;
12
13
class install_1_2_0 extends \phpbb\db\migration\migration
14
{
15
	public function effectively_installed()
16
	{
17
		return $this->config->offsetExists('dbtool_lock');
18
	}
19
20
	public static function depends_on()
21
	{
22
		return ['\vse\dbtool\migrations\install_1_1_0'];
23
	}
24
25
	public function update_data()
26
	{
27
		return [
28
			['config.add', ['dbtool_lock', 0, true]],
29
30
			['if', [
31
				$this->config->offsetExists('dbtool_version'),
32
				['config.remove', ['dbtool_version']],
33
			]],
34
		];
35
	}
36
}
37