Test Failed
Push — v5 ( a2f6fe...cc9616 )
by Andrew
46:10 queued 21:16
created

m250416_002420_drop_vestigial_tables::safeUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace nystudio107\seomatic\migrations;
4
5
use craft\db\Migration;
6
7
/**
8
 * m250416_002420_drop_vestigial_tables migration.
9
 */
10
class m250416_002420_drop_vestigial_tables extends Migration
11
{
12
    /**
13
     * @inheritdoc
14
     */
15
    public function safeUp(): bool
16
    {
17
        // Craft 2.x vestigial seomatic_meta table
18
        $this->dropTableIfExists('{{%seomatic_meta}}');
19
        // Craft 2.x vestigial seomatic_settings table
20
        $this->dropTableIfExists('{{%seomatic_settings}}');
21
22
        return true;
23
    }
24
25
    /**
26
     * @inheritdoc
27
     */
28
    public function safeDown(): bool
29
    {
30
        echo "m250416_002420_drop_vestigial_tables cannot be reverted.\n";
31
        return false;
32
    }
33
}
34