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
|
|
|
|