Passed
Branch develop-3.2.x-approve_donation (583092)
by Mario
04:43
created

v300_m2_converter_schema::revert_schema()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 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
	public static function depends_on()
20
	{
21
		return array('\skouat\ppde\migrations\v30x\v300_m1_converter_data');
22
	}
23
24
	/**
25
	 * Run migration if donation_mod_version config exists
26
	 *
27
	 * @return bool
28
	 */
29
	public function effectively_installed()
30
	{
31
		return !$this->db_tools->sql_table_exists($this->table_prefix . 'donation_item');
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