Completed
Push — master ( 58043b...413e7c )
by Sergi Tur
06:39
created

CreateUserMigrationsTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 0
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
/**
8
 * Class CreateUserMigrationsTable.
9
 */
10
class CreateUserMigrationsTable extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
11
{
12
    /**
13
     * Run the migrations.
14
     *
15
     * @return void
16
     */
17
    public function up()
18
    {
19
        Schema::create('user_migrations', function (Blueprint $table) {
0 ignored issues
show
Bug introduced by
The method create() does not exist on Illuminate\Support\Facades\Schema. Did you maybe mean createFreshMockInstance()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
20
            $table->increments('id');
21
            $table->string('source_user_id')->unsigned()->nullable();
22
            $table->json('source_user');
23
            $table->boolean('done')->default(true);
24
            $table->integer('user_id')->unsigned()->nullable();
25
            $table->integer('user_migrations_batch_id')->unsigned()->nullable();
26
            $table->timestamps();
27
        });
28
    }
29
30
    /**
31
     * Reverse the migrations.
32
     *
33
     * @return void
34
     */
35
    public function down()
36
    {
37
        Schema::dropIfExists('user_migrations');
38
    }
39
}
40