Completed
Pull Request — master (#14)
by
unknown
62:28
created

AddUserDataAndUrlToLernTables   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 33
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 9 1
A down() 0 9 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class AddUserDataAndUrlToLernTables extends Migration {
7
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        Schema::table(config('lern.record.table'), function(Blueprint $table) {
16
            $table->integer('user_id')->nullable();
17
            $table->text('data')->nullable();
18
            $table->string('url')->nullable();
19
            $table->string('method')->nullable();
20
        });
21
    }
22
23
    /**
24
     * Reverse the migrations.
25
     *
26
     * @return void
27
     */
28
    public function down()
29
    {
30
        Schema::table(config('lern.record.table'), function(Blueprint $table) {
31
            $table->dropColumn('user_id');
32
            $table->dropColumn('data');
33
            $table->dropColumn('url');
34
            $table->dropColumn('method');
35
        });
36
    }
37
38
}