1 | <?php |
||
2 | |||
3 | use Illuminate\Database\Migrations\Migration; |
||
4 | use Illuminate\Database\Schema\Blueprint; |
||
5 | |||
6 | class CreateAlertRulesTable 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_rules', function (Blueprint $table) { |
||
17 | $table->increments('id'); |
||
18 | $table->text('rule', 65535); |
||
19 | $table->enum('severity', array('ok','warning','critical')); |
||
20 | $table->string('extra'); |
||
21 | $table->boolean('disabled'); |
||
22 | $table->string('name')->unique('name'); |
||
23 | $table->text('query', 65535); |
||
24 | $table->text('builder', 65535); |
||
25 | $table->string('proc', 80)->nullable(); |
||
26 | }); |
||
27 | } |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Reverse the migrations. |
||
32 | * |
||
33 | * @return void |
||
34 | */ |
||
35 | public function down() |
||
36 | { |
||
37 | Schema::drop('alert_rules'); |
||
38 | } |
||
39 | } |
||
40 |
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.