Passed
Push — hotfix/salary_label ( f0401d )
by Josh
10:04
created

PopulateApplicationReviewLookups::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class PopulateApplicationReviewLookups extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        // Populate ReviewStatuses
17
        DB::table('review_statuses')->insert([
18
            ['id' => 1, 'name' => 'not_reviewed'],
19
            ['id' => 2, 'name' => 'partially_reviewed'],
20
            ['id' => 3, 'name' => 'reviewed'],
21
        ]);
22
23
        // Populate ReviewDecisions
24
        DB::table('review_decisions')->insert([
25
            ['id' => 1, 'name' => 'undecided'],
26
            ['id' => 2, 'name' => 'clarification'],
27
            ['id' => 3, 'name' => 'screened_in'],
28
            ['id' => 4, 'name' => 'screened_out'],
29
            ['id' => 5, 'name' => 'fake'],
30
        ]);
31
32
    }
33
34
    /**
35
     * Reverse the migrations.
36
     *
37
     * @return void
38
     */
39
    public function down()
40
    {
41
        DB::table('review_statuses')->whereIn('id', [1, 2, 3])->delete();
42
        DB::table('review_decisions')->whereIn('id', [1, 2, 3, 4, 5])->delete();
43
    }
44
}
45