2019_04_23_071015_create_table_config_province.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 CreateTableConfigProvince extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('config_province', function (Blueprint $table) {
  15. $table->bigIncrements('area_id');
  16. $table->string('area_name',30); //名称
  17. $table->integer('parent_id');//父级ID
  18. $table->integer('level');//级别
  19. $table->tinyInteger('sort');//排序
  20. $table->string('area_code',50)->nullable()->comment('地区编码');
  21. $table->string('city_code',50)->comment('城市编码');
  22. $table->string('center',50)->comment('城市中心点(即:经纬度坐标)');
  23. $table->integer('bjcity_id')->nullable()->comment('百度cityid');
  24. $table->timestamps();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('config_province');
  35. }
  36. }