2021_01_16_132234_create_area_risks_table.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateAreaRisksTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('area_risks', function (Blueprint $table) {
  15. $table->id();
  16. $table->bigInteger('province')->default(0)->comment('省份');
  17. $table->bigInteger('city')->default(0)->comment('市');
  18. $table->bigInteger('area')->default(0)->comment('县/区');
  19. $table->bigInteger('street')->default(0)->comment('乡级');
  20. $table->string('address', 300)->nullable()->comment('地址');
  21. $table->tinyInteger('risk')->default(0)->comment('风险等级');
  22. $table->date('release_time')->nullable()->comment('发布时间');
  23. $table->date('end_time')->nullable()->comment('结束时间');
  24. $table->bigInteger('admin_id')->default(0);
  25. $table->tinyInteger('status')->default(1);
  26. $table->timestamps();
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. Schema::dropIfExists('area_risks');
  37. }
  38. }