Passed
Push — master ( 0baeb0...d4017c )
by Tony
19:18 queued 08:55
created

2018_07_03_091314_create_alert_group_map_table.php (1 issue)

1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateAlertGroupMapTable 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...
7
{
8
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('alert_group_map', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->unsignedInteger('rule_id');
19
            $table->unsignedInteger('group_id');
20
            $table->unique(['rule_id','group_id'], 'alert_group_map_rule_id_group_id_uindex');
21
        });
22
    }
23
24
    /**
25
     * Reverse the migrations.
26
     *
27
     * @return void
28
     */
29
    public function down()
30
    {
31
        Schema::drop('alert_group_map');
32
    }
33
}
34