2020_08_21_145711_create_node_rule_table.php 981 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateNodeRuleTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('node_rule', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->unsignedInteger('node_id')->nullable()->comment('节点ID');
  17. $table->unsignedInteger('rule_id')->nullable()->comment('审计规则ID');
  18. $table->boolean('is_black')->default(1)->comment('是否黑名单模式:0-不是、1-是');
  19. $table->dateTime('created_at')->comment('创建时间');
  20. $table->dateTime('updated_at')->comment('最后更新时间');
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. Schema::dropIfExists('node_rule');
  31. }
  32. }