Code Duplication    Length = 18-21 lines in 2 locations

database/migrations/2016_12_16_215030_create_specialities_table.php 1 location

@@ 14-34 (lines=21) @@
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('specialities', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->integer('code');
19
            $table->string('name');
20
            $table->timestamps();
21
        });
22
        Schema::create('speciality_user', function (Blueprint $table) {
23
            $table->integer('user_id')->unsigned();
24
            $table->integer('speciality_id')->unsigned();
25
            $table->timestamps();
26
            $table->unique(['user_id', 'speciality_id']);
27
        });
28
        Schema::create('speciality_submodule', function (Blueprint $table) {
29
            $table->integer('speciality_id')->unsigned();
30
            $table->integer('submodule_id')->unsigned();
31
            $table->timestamps();
32
            $table->unique(['speciality_id', 'submodule_id']);
33
        });
34
    }
35
    /**
36
     * Reverse the migrations.
37
     *

database/migrations/2016_12_16_220133_create_modules_table.php 1 location

@@ 17-34 (lines=18) @@
14
     *
15
     * @return void
16
     */
17
    public function up()
18
    {
19
        Schema::create('modules', function (Blueprint $table) {
20
            $table->increments('id');
21
            $table->string('name');
22
            $table->boolean('selected')->nullable();
23
            $table->unsignedTinyInteger('order')->nullable();
24
            $table->integer('study_id')->unsigned()->nullable();
25
            $table->timestamps();
26
            $table->unique(array('name', 'order','study_id'));
27
        });
28
        Schema::create('course_module', function (Blueprint $table) {
29
            $table->integer('course_id')->unsigned();
30
            $table->integer('module_id')->unsigned();
31
            $table->timestamps();
32
            $table->unique(['course_id', 'module_id']);
33
        });
34
    }
35
    /**
36
     * Reverse the migrations.
37
     *