| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateRuleTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('rule', function (Blueprint $table) {
- $table->increments('id');
- $table->boolean('type')->default(1)->comment('类型:1-正则表达式、2-域名、3-IP、4-协议');
- $table->string('name', 100)->comment('规则描述');
- $table->text('pattern')->comment('规则值');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('rule');
- }
- }
|