2025_06_18_072530_create_esgs_table.php 927B

1234567891011121314151617181920212223242526272829303132333435
  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('esgs', function (Blueprint $table) {
  13. $table->id();
  14. $table->string('keyword')->index();
  15. $table->json('title')->comment('標題');
  16. $table->json("description")->comment("短文");
  17. $table->string("banner_pc")->comment("banner for pc");
  18. $table->string("banner_mobile")->comment("banner for mobile");
  19. $table->json("banner_alt")->comment("banner alt");
  20. $table->timestamps();
  21. $table->softDeletes();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. */
  27. public function down(): void
  28. {
  29. Schema::dropIfExists('esgs');
  30. }
  31. };