Passed
Push — master ( e24ae8...fb230b )
by M. Mikkel
05:45
created

safeUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace mmikkel\cacheflag\migrations;
4
5
use craft\db\Migration;
6
7
/**
8
 * Class m220620_191334_delete_cacheflag_flagged_database_table
9
 * @package mmikkel\cacheflag\migrations
10
 * @since 1.3.1
11
 */
12
class m220620_191334_delete_cacheflag_flagged_database_table extends Migration
13
{
14
15
    /** @inheritdoc */
16
    public function safeUp()
17
    {
18
        // Remove the old "cacheflag_flagged" table if it exists
19
        $this->dropTableIfExists('{{%cacheflag_flagged}}');
20
    }
21
22
    /** @inheritdoc */
23
    public function safeDown()
24
    {
25
        echo "m220620_191334_delete_cacheflag_flagged_database_table cannot be reverted.\n";
26
        return false;
27
    }
28
29
}
30