2025_09_18_092245_create_regions_table.php 721B

1234567891011121314151617181920212223242526272829303132
  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. public function up(): void
  11. {
  12. Schema::create('regions', function (Blueprint $table) {
  13. $table->id();
  14. $table->json("name")->comment("名稱");
  15. $table->integer("order")->default(0);
  16. $table->boolean("visible")->default(1);
  17. $table->timestamps();
  18. $table->softDeletes();
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. */
  24. public function down(): void
  25. {
  26. Schema::dropIfExists('regions');
  27. }
  28. };