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

2018_07_03_091314_create_alert_rules_table.php (1 issue)

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
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_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