Code Duplication    Length = 31-32 lines in 6 locations

database/migrations/2017_05_28_135015_create_news_table.php 1 location

@@ 7-38 (lines=32) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateNewsTable extends Migration
8
{
9
    /**
10
      * Run the migrations.
11
      *
12
      * @return void
13
      */
14
     public function up()
15
     {
16
         // create table 'news'
17
         Schema::create('news', function (Blueprint $table) {
18
             $table->increments('id');
19
             $table->string('title', 255);
20
             $table->string('slug', 100)->unique();
21
             $table->text('short_description');
22
             $table->text('full_content');
23
             $table->string('author', 100);
24
             $table->string('category', 100);
25
             $table->timestamps(); // timestamps() creates created_at & updated_at fields
26
         });
27
     }
28
29
    /**
30
     * Reverse the migrations.
31
     *
32
     * @return void
33
     */
34
    public function down()
35
    {
36
        Schema::dropIfExists('news');
37
    }
38
}
39

database/migrations/2017_05_30_092525_create_location_table.php 1 location

@@ 7-37 (lines=31) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateLocationTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('location', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('name', 100);
19
            $table->string('shortName', 50);
20
            $table->string('description', 240);
21
            $table->date('date_entrance');
22
            $table->date('last_update');
23
            $table->timestamps();
24
            $table->softDeletes();
25
        });
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     *
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        Schema::dropIfExists('location');
36
    }
37
}
38

database/migrations/2017_05_30_092548_create_providers_table.php 1 location

@@ 7-37 (lines=31) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateProvidersTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('providers', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('name', 120);
19
            $table->string('shortName', 50);
20
            $table->text('description', 240);
21
            $table->date('date_entrance');
22
            $table->date('last_update');
23
            $table->timestamps();
24
            $table->softDeletes();
25
        });
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     *
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        Schema::dropIfExists('providers');
36
    }
37
}
38

database/migrations/2017_05_30_172008_create_moneySource_table.php 1 location

@@ 7-37 (lines=31) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateMoneySourceTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('moneySource', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('name', 120);
19
            $table->string('shortName', 50);
20
            $table->text('description', 240);
21
            $table->date('date_entrance');
22
            $table->date('last_update');
23
            $table->timestamps();
24
            $table->softDeletes();
25
        });
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     *
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        Schema::dropIfExists('moneySource');
36
    }
37
}
38

database/migrations/2017_05_31_100142_create_provider_table.php 1 location

@@ 7-37 (lines=31) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateProviderTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('provider', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('name', 120);
19
            $table->string('shortName', 50);
20
            $table->text('description', 240);
21
            $table->date('date_entrance');
22
            $table->date('last_update');
23
            $table->timestamps();
24
            $table->softDeletes();
25
        });
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     *
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        Schema::dropIfExists('provider');
36
    }
37
}
38

database/migrations/2017_05_31_122910_create_brand_table.php 1 location

@@ 7-37 (lines=31) @@
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateBrandTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('brand', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('name', 120);
19
            $table->string('shortName', 50);
20
            $table->text('description', 240);
21
            $table->date('date_entrance');
22
            $table->date('last_update');
23
            $table->timestamps();
24
            $table->softDeletes();
25
        });
26
    }
27
28
    /**
29
     * Reverse the migrations.
30
     *
31
     * @return void
32
     */
33
    public function down()
34
    {
35
        Schema::dropIfExists('brand');
36
    }
37
}
38