Completed
Push — master ( 3f27cb...915db5 )
by Mario
05:56 queued 02:52
created

v300_m2_converter_schema::update_schema()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
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\v30x;
12
13
/**
14
 * This migration removes old schema from 3.0
15
 * installations of PayPal Donation MOD.
16
 */
17
class v300_m2_converter_schema extends \phpbb\db\migration\migration
18
{
19
	/**
20
	 * Run migration if donation_mod_version config exists
21
	 *
22
	 * @return bool
23
	 */
24
	public function effectively_installed()
25
	{
26
		return !$this->db_tools->sql_table_exists($this->table_prefix . 'donation_item');
27
	}
28
29
	public static function depends_on()
30
	{
31
		return array('\skouat\ppde\migrations\v30x\v300_m1_converter_data');
32
	}
33
34
	/**
35
	 * {@inheritdoc}
36
	 */
37
	public function update_schema()
38
	{
39
		return array(
40
			'drop_tables'	=> array(
41
				$this->table_prefix . 'donation_item',
42
			),
43
		);
44
	}
45
}
46