1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use Illuminate\Support\Facades\Schema; |
4
|
|
|
use Illuminate\Database\Schema\Blueprint; |
5
|
|
|
use Illuminate\Database\Migrations\Migration; |
6
|
|
|
|
7
|
|
|
class PopulateAssessmentTypeTranslations extends Migration |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* Run the migrations. |
11
|
|
|
* |
12
|
|
|
* @return void |
13
|
|
|
*/ |
14
|
|
|
public function up() |
15
|
|
|
{ |
16
|
|
|
/** |
17
|
|
|
* Narrative assessment |
18
|
|
|
Take home exam – Scenario |
19
|
|
|
Take home exam – Technical |
20
|
|
|
Take home exam – Behavioural |
21
|
|
|
Portfolio review |
22
|
|
|
Portfolio review with candidate |
23
|
|
|
Interview question – Technical |
24
|
|
|
Interview question – Scenario |
25
|
|
|
Interview question – Behaviour |
26
|
|
|
Interview – Overall performance |
27
|
|
|
Group test |
28
|
|
|
Reference check – Traditional |
29
|
|
|
Reference check – Micro |
30
|
|
|
Certificate or formal credential |
31
|
|
|
*/ |
32
|
|
|
DB::table('assessment_type_translations')->insert([ |
33
|
|
|
['id' => 1, 'assessment_type_id' => 1, 'locale' => 'en', 'name' => 'Narrative Assessment'], |
34
|
|
|
['id' => 2, 'assessment_type_id' => 1, 'locale' => 'fr', 'name' => 'Narrative Assessment'], |
35
|
|
|
['id' => 3, 'assessment_type_id' => 2, 'locale' => 'en', 'name' => 'Take home exam – Scenario'], |
36
|
|
|
['id' => 4, 'assessment_type_id' => 2, 'locale' => 'fr', 'name' => 'Take home exam – Scenario'], |
37
|
|
|
['id' => 5, 'assessment_type_id' => 3, 'locale' => 'en', 'name' => 'Take home exam – Technical'], |
38
|
|
|
['id' => 6, 'assessment_type_id' => 3, 'locale' => 'fr', 'name' => 'Take home exam – Technical'], |
39
|
|
|
['id' => 7, 'assessment_type_id' => 4, 'locale' => 'en', 'name' => 'Take home exam – Behavioural'], |
40
|
|
|
['id' => 8, 'assessment_type_id' => 4, 'locale' => 'fr', 'name' => 'Take home exam – Behavioural'], |
41
|
|
|
['id' => 9, 'assessment_type_id' => 5, 'locale' => 'en', 'name' => 'Portfolio review'], |
42
|
|
|
['id' => 10, 'assessment_type_id' => 5, 'locale' => 'fr', 'name' => 'Portfolio review'], |
43
|
|
|
['id' => 11, 'assessment_type_id' => 6, 'locale' => 'en', 'name' => 'Portfolio review with candidate'], |
44
|
|
|
['id' => 12, 'assessment_type_id' => 6, 'locale' => 'fr', 'name' => 'Portfolio review with candidate'], |
45
|
|
|
['id' => 13, 'assessment_type_id' => 7, 'locale' => 'en', 'name' => 'Interview question – Technical'], |
46
|
|
|
['id' => 14, 'assessment_type_id' => 7, 'locale' => 'fr', 'name' => 'Interview question – Technical'], |
47
|
|
|
['id' => 15, 'assessment_type_id' => 8, 'locale' => 'en', 'name' => 'Interview question – Scenario'], |
48
|
|
|
['id' => 16, 'assessment_type_id' => 8, 'locale' => 'fr', 'name' => 'Interview question – Scenario'], |
49
|
|
|
['id' => 17, 'assessment_type_id' => 9, 'locale' => 'en', 'name' => 'Interview question – Behaviour'], |
50
|
|
|
['id' => 18, 'assessment_type_id' => 9, 'locale' => 'fr', 'name' => 'Interview question – Behaviour'], |
51
|
|
|
['id' => 19, 'assessment_type_id' => 10, 'locale' => 'en', 'name' => 'Interview – Overall performance'], |
52
|
|
|
['id' => 20, 'assessment_type_id' => 10, 'locale' => 'fr', 'name' => 'Interview – Overall performance'], |
53
|
|
|
['id' => 21, 'assessment_type_id' => 11, 'locale' => 'en', 'name' => 'Group test'], |
54
|
|
|
['id' => 22, 'assessment_type_id' => 11, 'locale' => 'fr', 'name' => 'Group test'], |
55
|
|
|
['id' => 23, 'assessment_type_id' => 12, 'locale' => 'en', 'name' => 'Reference check – Traditional'], |
56
|
|
|
['id' => 24, 'assessment_type_id' => 12, 'locale' => 'fr', 'name' => 'Reference check – Traditional'], |
57
|
|
|
['id' => 25, 'assessment_type_id' => 13, 'locale' => 'en', 'name' => 'Reference check – Micro'], |
58
|
|
|
['id' => 26, 'assessment_type_id' => 13, 'locale' => 'fr', 'name' => 'Reference check – Micro'], |
59
|
|
|
['id' => 27, 'assessment_type_id' => 14, 'locale' => 'en', 'name' => 'Certificate or formal credentia'], |
60
|
|
|
['id' => 28, 'assessment_type_id' => 14, 'locale' => 'fr', 'name' => 'Certificate or formal credentia'], |
61
|
|
|
]); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Reverse the migrations. |
66
|
|
|
* |
67
|
|
|
* @return void |
68
|
|
|
*/ |
69
|
|
|
public function down() |
70
|
|
|
{ |
71
|
|
|
DB::table('assessment_type_translations')->whereIn('id', [ |
72
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, |
73
|
|
|
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
74
|
|
|
21, 22, 23, 24, 25, 26, 27, 28 |
75
|
|
|
])->delete(); |
76
|
|
|
} |
77
|
|
|
} |
78
|
|
|
|