2026_03_03_164521_create_timezones_table.php 834 B

12345678910111213141516171819202122232425262728293031
  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('timezones', function (Blueprint $table) {
  13. $table->id();
  14. $table->string('name', 100)->nullable()->comment('时区名称');
  15. $table->string('code', 50)->nullable()->comment('时区代码');
  16. $table->integer('status')->nullable()->default(1)->comment('状态: 1-正常, 0-禁用');
  17. $table->timestamps();
  18. $table->comment('时区表');
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. */
  24. public function down(): void
  25. {
  26. Schema::dropIfExists('timezones');
  27. }
  28. };