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

m180823_193925_clean_identity_table   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 22
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A safeUp() 0 7 1
A safeDown() 0 5 1
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