| 12345678910111213141516171819202122232425262728293031 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration
- {
- /**
- * Run the migrations.
- */
- public function up(): void
- {
- Schema::create('timezones', function (Blueprint $table) {
- $table->id();
- $table->string('name', 100)->nullable()->comment('时区名称');
- $table->string('code', 50)->nullable()->comment('时区代码');
- $table->integer('status')->nullable()->default(1)->comment('状态: 1-正常, 0-禁用');
- $table->timestamps();
- $table->comment('时区表');
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('timezones');
- }
- };
|