1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use Illuminate\Database\Migrations\Migration; |
4
|
|
|
use Illuminate\Database\Schema\Blueprint; |
5
|
|
|
use Illuminate\Support\Facades\Schema; |
6
|
|
|
|
7
|
|
|
return new class extends Migration |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* Run the migrations. |
11
|
|
|
* |
12
|
|
|
* @return void |
13
|
|
|
*/ |
14
|
|
|
public function up() |
15
|
|
|
{ |
16
|
|
|
Schema::table('person_events', function (Blueprint $table) { |
17
|
|
|
$table->integer('year')->nullable(); |
18
|
|
|
$table->integer('month')->nullable(); |
19
|
|
|
$table->integer('day')->nullable(); |
20
|
|
|
$table->string('type')->nullable(); |
21
|
|
|
$table->string('attr')->nullable(); |
22
|
|
|
$table->string('plac')->nullable(); |
23
|
|
|
$table->integer('addr_id')->nullable(); |
24
|
|
|
$table->string('phon')->nullable(); |
25
|
|
|
$table->text('caus')->nullable(); |
26
|
|
|
$table->string('age')->nullable(); |
27
|
|
|
$table->string('agnc')->nullable(); |
28
|
|
|
$table->string('adop')->nullable(); |
29
|
|
|
$table->string('adop_famc')->nullable(); |
30
|
|
|
$table->string('birt_famc')->nullable(); |
31
|
|
|
}); |
32
|
|
|
Schema::table('family_events', function (Blueprint $table) { |
33
|
|
|
$table->integer('year')->nullable(); |
34
|
|
|
$table->integer('month')->nullable(); |
35
|
|
|
$table->integer('day')->nullable(); |
36
|
|
|
$table->string('type')->nullable(); |
37
|
|
|
$table->string('plac')->nullable(); |
38
|
|
|
$table->integer('addr_id')->nullable(); |
39
|
|
|
$table->string('phon')->nullable(); |
40
|
|
|
$table->text('caus')->nullable(); |
41
|
|
|
$table->string('age')->nullable(); |
42
|
|
|
$table->string('agnc')->nullable(); |
43
|
|
|
$table->integer('husb')->nullable(); |
44
|
|
|
$table->integer('wife')->nullable(); |
45
|
|
|
}); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* Reverse the migrations. |
50
|
|
|
* |
51
|
|
|
* @return void |
52
|
|
|
*/ |
53
|
|
|
public function down() |
54
|
|
|
{ |
55
|
|
|
Schema::table('person_events', function (Blueprint $table) { |
56
|
|
|
$table->dropColumn('year'); |
57
|
|
|
$table->dropColumn('month'); |
58
|
|
|
$table->dropColumn('day'); |
59
|
|
|
$table->dropColumn('type'); |
60
|
|
|
$table->dropColumn('attr'); |
61
|
|
|
$table->dropColumn('plac'); |
62
|
|
|
$table->dropColumn('addr_id'); |
63
|
|
|
$table->dropColumn('phon'); |
64
|
|
|
$table->dropColumn('caus'); |
65
|
|
|
$table->dropColumn('age'); |
66
|
|
|
$table->dropColumn('agnc'); |
67
|
|
|
$table->dropColumn('adop'); |
68
|
|
|
$table->dropColumn('adop_famc'); |
69
|
|
|
$table->dropColumn('birt_famc'); |
70
|
|
|
}); |
71
|
|
|
Schema::table('family_events', function (Blueprint $table) { |
72
|
|
|
$table->dropColumn('year'); |
73
|
|
|
$table->dropColumn('month'); |
74
|
|
|
$table->dropColumn('day'); |
75
|
|
|
$table->dropColumn('type'); |
76
|
|
|
$table->dropColumn('plac'); |
77
|
|
|
$table->dropColumn('addr_id'); |
78
|
|
|
$table->dropColumn('phon'); |
79
|
|
|
$table->dropColumn('caus'); |
80
|
|
|
$table->dropColumn('age'); |
81
|
|
|
$table->dropColumn('agnc'); |
82
|
|
|
$table->dropColumn('husb'); |
83
|
|
|
$table->dropColumn('wife'); |
84
|
|
|
}); |
85
|
|
|
} |
86
|
|
|
} |
|
|
|
|
87
|
|
|
|