AddClickUpTokenToUsersTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 11
c 1
b 0
f 0
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 6 1
A up() 0 8 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
/**
8
 * Class AddClickUpTokenToUsersTable
9
 *
10
 * Adds a column for the ClickUp API token to your users table.
11
 */
12
class AddClickUpTokenToUsersTable extends Migration
13
{
14
    /**
15
     * Run the migrations.
16
     *
17
     * @return void
18
     */
19
    public function up()
20
    {
21
        Schema::table(
22
            'users',
23
            function (Blueprint $table) {
24
                $table->string('clickup_token', 1024)
25
                      ->after('password')
26
                      ->nullable();
27
            }
28
        );
29
    }
30
31
    /**
32
     * Reverse the migrations.
33
     *
34
     * @return void
35
     */
36
    public function down()
37
    {
38
        Schema::table(
39
            'users',
40
            function (Blueprint $table) {
41
                $table->dropColumn('clickup_token');
42
            }
43
        );
44
    }
45
}
46