|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
use Illuminate\Support\Facades\Schema; |
|
4
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
5
|
|
|
use Illuminate\Database\Migrations\Migration; |
|
6
|
|
|
|
|
7
|
|
|
class PopulateCitizenshipDeclarations extends Migration |
|
8
|
|
|
{ |
|
9
|
|
|
/** |
|
10
|
|
|
* Run the migrations. |
|
11
|
|
|
* |
|
12
|
|
|
* @return void |
|
13
|
|
|
*/ |
|
14
|
|
|
public function up() |
|
15
|
|
|
{ |
|
16
|
|
|
DB::table('citizenship_declarations')->insert([ |
|
17
|
|
|
['id' => 1, 'name' => 'citizen'], |
|
18
|
|
|
['id' => 2, 'name' => 'permanent_resident'], |
|
19
|
|
|
['id' => 3, 'name' => 'work_permit_open'], |
|
20
|
|
|
['id' => 4, 'name' => 'work_permit_closed'], |
|
21
|
|
|
['id' => 5, 'name' => 'not_entitled'], |
|
22
|
|
|
]); |
|
23
|
|
|
|
|
24
|
|
|
DB::table('citizenship_declaration_translations')->insert([ |
|
25
|
|
|
['id' => 1, 'citizenship_declaration_id' => 1, 'locale' => 'en', 'value' => 'Canadian Citizen'], |
|
26
|
|
|
['id' => 2, 'citizenship_declaration_id' => 1, 'locale' => 'fr', 'value' => 'Citoyen Canadien'], |
|
27
|
|
|
['id' => 3, 'citizenship_declaration_id' => 2, 'locale' => 'en', 'value' => 'Permanent Resident of Canada'], |
|
28
|
|
|
['id' => 4, 'citizenship_declaration_id' => 2, 'locale' => 'fr', 'value' => 'Résident Permanent du Canada'], |
|
29
|
|
|
['id' => 5, 'citizenship_declaration_id' => 3, 'locale' => 'en', 'value' => 'Open - Work Permit'], |
|
30
|
|
|
['id' => 6, 'citizenship_declaration_id' => 3, 'locale' => 'fr', 'value' => 'Open - Permis de Travail'], |
|
31
|
|
|
['id' => 7, 'citizenship_declaration_id' => 4, 'locale' => 'en', 'value' => 'Closed - Work Permit'], |
|
32
|
|
|
['id' => 8, 'citizenship_declaration_id' => 4, 'locale' => 'fr', 'value' => 'Fermé - Permis de Travail'], |
|
33
|
|
|
['id' => 9, 'citizenship_declaration_id' => 5, 'locale' => 'en', 'value' => 'I am currently not entitled to work in Canada'], |
|
34
|
|
|
['id' => 10, 'citizenship_declaration_id' => 5, 'locale' => 'fr', 'value' => 'Je nai Actuellement pas le Droit de Travailler au Canada'], |
|
35
|
|
|
]); |
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* Reverse the migrations. |
|
40
|
|
|
* |
|
41
|
|
|
* @return void |
|
42
|
|
|
*/ |
|
43
|
|
|
public function down() |
|
44
|
|
|
{ |
|
45
|
|
|
DB::table('citizenship_declarations')->whereIn('id', [1, 2, 3, 4, 5])->delete(); |
|
46
|
|
|
DB::table('citizenship_declaration_translations')->whereIn('id', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])->delete(); |
|
47
|
|
|
} |
|
48
|
|
|
} |
|
49
|
|
|
|