CreateTeachersTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 14
nc 1
nop 0
dl 0
loc 22
rs 9.7998
c 0
b 0
f 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateTeachersTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('teachers', function (Blueprint $table) {
17
            $table->id();
18
            $table->foreignId('user_id')->constrained();
19
            $table->foreignId('country_id')->constrained();
20
21
            $table->string('name');
22
            $table->string('surname');
23
24
            $table->text('bio')->nullable();
25
            $table->string('year_starting_practice')->nullable();
26
            $table->string('year_starting_teach')->nullable();
27
            $table->text('significant_teachers')->nullable();
28
29
            //$table->string('profile_picture')->nullable();
30
            $table->string('website')->nullable();
31
            $table->string('facebook')->nullable();
32
33
            $table->string('slug');
34
35
            $table->timestamps();
36
        });
37
    }
38
39
    /**
40
     * Reverse the migrations.
41
     *
42
     * @return void
43
     */
44
    public function down()
45
    {
46
        Schema::dropIfExists('teachers');
47
    }
48
}
49