2019_09_23_120902_create_warning_logs_table.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateWarningLogsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('warning_logs', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('box_no', 50)->nullable()->comment('中控编号');
  17. $table->string('bike_no', 50)->nullable()->comment('车辆编号');
  18. $table->tinyInteger('type')->default(0)->comment('警告类型');
  19. $table->text('body')->nullable()->comment('数据');
  20. $table->text('source_body')->nullable()->comment('原报文数据');
  21. $table->string('source')->comment('采集来源');
  22. $table->tinyInteger('error_grade')->default(0)->comment('错误等级');
  23. $table->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('warning_logs');
  34. }
  35. }