Code Duplication    Length = 18-19 lines in 3 locations

api/database/migrations/CreateTeamTable.php 1 location

@@ 6-23 (lines=18) @@
3
use Illuminate\Database\Capsule\Manager as Capsule;
4
use \Illuminate\Database\Schema\Blueprint as Blueprint;
5
6
class CreateTeamTable
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function run()
14
    {
15
        Capsule::schema()->dropIfExists('teams');
16
        Capsule::schema()->create('teams', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('name');
19
            $table->string('nationality',2);
20
            $table->timestamps();
21
        });
22
    }
23
}
24

api/database/migrations/CreateLeaguesTable.php 1 location

@@ 6-23 (lines=18) @@
3
use Illuminate\Database\Capsule\Manager as Capsule;
4
use \Illuminate\Database\Schema\Blueprint as Blueprint;
5
6
class CreateLeaguesTable
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function run()
14
    {
15
        Capsule::schema()->dropIfExists('leagues');
16
        Capsule::schema()->create('leagues', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('name');
19
            $table->unsignedTinyInteger('teams')->default(2);
20
            $table->timestamps();
21
        });
22
    }
23
}
24

api/database/migrations/CreateLeagueRoundsTable.php 1 location

@@ 6-24 (lines=19) @@
3
use Illuminate\Database\Capsule\Manager as Capsule;
4
use \Illuminate\Database\Schema\Blueprint as Blueprint;
5
6
class CreateLeagueRoundsTable
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function run()
14
    {
15
        Capsule::schema()->dropIfExists('league_rounds');
16
        Capsule::schema()->create('league_rounds', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->integer('league_id');
19
            $table->boolean('simulated')->default(false);
20
            $table->integer('day')->default(0);
21
            $table->timestamps();
22
        });
23
    }
24
}
25