1
0

2020_08_21_145711_create_node_rule_table.php 858 B

1234567891011121314151617181920212223242526272829303132
  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. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up() {
  12. Schema::create('node_rule', function(Blueprint $table) {
  13. $table->increments('id');
  14. $table->unsignedInteger('node_id')->nullable()->comment('节点ID');
  15. $table->unsignedInteger('rule_id')->nullable()->comment('审计规则ID');
  16. $table->boolean('is_black')->default(1)->comment('是否黑名单模式:0-不是、1-是');
  17. $table->dateTime('created_at')->comment('创建时间');
  18. $table->dateTime('updated_at')->comment('最后更新时间');
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. *
  24. * @return void
  25. */
  26. public function down() {
  27. Schema::dropIfExists('node_rule');
  28. }
  29. }