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
|
|||
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 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.