Completed
Branch master (4042af)
by Aleksandar
02:32
created

Page   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 6
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class Page extends AbstractMigration
6
{
7
    public function change()
8
    {
9
        $this->table('page', ['id' => false, 'primary_key' => 'page_uuid'])
10
            ->addColumn('page_uuid', 'binary', ['limit' => 16])
11
            ->addColumn('page_id', 'text')
12
            ->addColumn('title', 'text')
13
            ->addColumn('body', 'text')
14
            ->addColumn('description', 'text')
15
            ->addColumn('slug', 'text')
16
            ->addColumn('main_img', 'text', ['null' => true])
17
            ->addColumn('has_layout', 'boolean', ['default' => true])
18
            ->addColumn('is_homepage', 'boolean', ['default' => false])
19
            ->addColumn('is_active', 'boolean', ['default' => false])
20
            ->addColumn('is_wysiwyg_editor', 'boolean', ['default' => false])
21
            ->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP'])
22
            ->create();
23
    }
24
}
25