2021_01_16_132326_create_policy_risks_table.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreatePolicyRisksTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('policy_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->date('release_time')->comment('发布时间');
  21. $table->string('address', 300)->nullable()->comment('地址');
  22. $table->tinyInteger('risk')->default(0)->comment('风险等级');
  23. $table->string('body', 500)->comment('描述');
  24. $table->bigInteger('policy_id')->default(0)->comment('政策id');
  25. $table->bigInteger('admin_id')->default(0);
  26. $table->tinyInteger('status')->default(1);
  27. $table->timestamps();
  28. });
  29. }
  30. /**
  31. * Reverse the migrations.
  32. *
  33. * @return void
  34. */
  35. public function down()
  36. {
  37. Schema::dropIfExists('policy_risks');
  38. }
  39. }