UpdateUserTableWithSocialauthColumns::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
c 0
b 0
f 0
rs 9.7998
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class UpdateUserTableWithSocialauthColumns extends Migration
7
{
8
9
    /**
10
     * Run the migrations.
11
     */
12
    public function up()
13
    {
14
        Schema::table('users', function (Blueprint $table) {
15
            $table->string('social_provider')->nullable();
16
            $table->string('social_nickname')->nullable();
17
            $table->string('social_id')->nullable();
18
            $table->longText('social_token')->nullable();
19
            $table->longText('social_token_secret')->nullable();
20
            $table->longText('social_refresh_token')->nullable();
21
            $table->string('social_expires_in')->nullable();
22
            $table->string('social_avatar')->nullable();
23
            $table->string('social_avatar_original')->nullable();
24
        });
25
    }
26
27
    /**
28
     * Reverse the migrations.
29
     */
30
    public function down()
31
    {
32
        Schema::table('users', function (Blueprint $table) {
0 ignored issues
show
Unused Code introduced by Mahmoud Zalt
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
33
//            $table->dropColumn('social_provider');
34
//            $table->dropColumn('social_nickname');
35
//            $table->dropColumn('social_id');
36
//            $table->dropColumn('social_token');
37
//            $table->dropColumn('social_token_secret');
38
//            $table->dropColumn('social_refresh_token');
39
//            $table->dropColumn('social_expires_in');
40
//            $table->dropColumn('social_avatar');
41
//            $table->dropColumn('social_avatar_original');
42
        });
43
    }
44
}
45