Completed
Branch feature/currentUserRefactoring (c13c1d)
by Schlaefer
09:08
created

CategoriesSeed::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 11
nc 1
nop 0
dl 0
loc 17
rs 9.9
c 1
b 0
f 0
1
<?php
2
use Migrations\AbstractSeed;
3
4
/**
5
 * Categories seed.
6
 */
7
class CategoriesSeed extends AbstractSeed
8
{
9
    /**
10
     * Run Method.
11
     *
12
     * Write your database seeder using this method.
13
     *
14
     * More information on writing seeds is available here:
15
     * http://docs.phinx.org/en/latest/seeding.html
16
     *
17
     * @return void
18
     */
19
    public function run()
20
    {
21
        $data = [
22
            [
23
                'id' => 1,
24
                'category_order' => 1,
25
                'category' => 'Ontopic',
26
                'description' => '',
27
                'accession' => 0,
28
                'accession_new_thread' => 1,
29
                'accession_new_posting' => 1,
30
                'thread_count' => 0,
31
            ],
32
        ];
33
34
        $table = $this->table('categories');
35
        $table->insert($data)->save();
36
    }
37
}
38