Completed
Push — master ( 38f88d...1223fc )
by Damien
08:46
created

m180823_193925_clean_identity_table::safeDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace flipbox\saml\sp\migrations;
4
5
use Craft;
6
use craft\db\Migration;
7
use flipbox\saml\sp\records\ProviderIdentityRecord;
8
9
/**
10
 * m180823_193925_clean_identity_table migration.
11
 */
12
class m180823_193925_clean_identity_table extends Migration
13
{
14
    /**
15
     * @inheritdoc
16
     */
17
    public function safeUp()
18
    {
19
        /**
20
         * We have to do this due to the name id be saved wrongly.
21
         */
22
        ProviderIdentityRecord::deleteAll();
23
    }
24
25
    /**
26
     * @inheritdoc
27
     */
28
    public function safeDown()
29
    {
30
        echo "m180823_193925_clean_identity_table cannot be reverted.\n";
31
        return false;
32
    }
33
}
34