Passed
Pull Request — master (#22)
by Anton
02:37
created

ContactUsPermissions::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * @copyright Bluz PHP Team
4
 * @link https://github.com/bluzphp/skeleton
5
 */
6
7
use Phinx\Migration\AbstractMigration;
8
9
/**
10
 * CreateContactUsTable
11
 */
12
class ContactUsPermissions extends AbstractMigration
13
{
14
    /**
15
     * Migrate Up.
16
     */
17
    public function up()
18
    {
19
        $data = [
20
            [
21
                'roleId' => 2,
22
                'module' => 'contact-us',
23
                'privilege' => 'Management'
24
            ]
25
        ];
26
27
        $privileges = $this->table('acl_privileges');
28
        $privileges->insert($data)
29
            ->save();
30
    }
31
32
    /**
33
     * Migrate Down.
34
     */
35
    public function down()
36
    {
37
        $this->execute('DELETE FROM acl_privileges WHERE module = "contact-us"');
38
    }
39
}
40