2024_11_15_093359_create_sys_region_table.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('sys_region', function (Blueprint $table) {
  15. $table->comment('行政区划');
  16. $table->increments('id');
  17. $table->string('cityName')->default('');
  18. $table->integer('parentId');
  19. $table->string('shortName')->default('');
  20. $table->integer('depth');
  21. $table->string('cityCode')->default('');
  22. $table->string('zipCode')->default('');
  23. $table->string('mergerName')->default('');
  24. $table->string('longitude')->default('');
  25. $table->string('latitude')->default('');
  26. $table->string('pinyin')->default('');
  27. $table->unsignedInteger('isUse')->nullable();
  28. $table->timestamps();
  29. $table->softDeletes();
  30. });
  31. }
  32. /**
  33. * Reverse the migrations.
  34. *
  35. * @return void
  36. */
  37. public function down()
  38. {
  39. Schema::dropIfExists('sys_region');
  40. }
  41. };