Conditions | 1 |
Paths | 1 |
Total Lines | 30 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function safeUp() |
||
14 | { |
||
15 | $this->createTable('pages', |
||
16 | [ |
||
17 | 'id' => $this->primaryKey(), |
||
18 | 'parentId' => $this->integer(), |
||
19 | 'active' => $this->tinyInteger(1)->notNull()->defaultValue(0), |
||
20 | 'icon' => $this->string(64), |
||
21 | 'title' => $this->string(), |
||
22 | 'description' => $this->text(), |
||
23 | 'content' => $this->text(), |
||
24 | 'metaKeys' => $this->string(), |
||
25 | 'metaDescription' => $this->string(), |
||
26 | 'created_at' => $this->dateTime(), |
||
27 | 'updated_at' => $this->dateTime(), |
||
28 | ] |
||
29 | ); |
||
30 | |||
31 | $this->createIndex( |
||
32 | 'idx-pages-parentId', |
||
33 | 'pages', |
||
34 | 'parentId' |
||
35 | ); |
||
36 | |||
37 | $this->createIndex( |
||
38 | 'idx-pages-active', |
||
39 | 'pages', |
||
40 | 'active' |
||
41 | ); |
||
42 | } |
||
43 | |||
62 |