✏️ 编辑:2026_06_25_162332_create_newspapers_table.php
路径:
/home/boguraj1/.trash/database.1/migrations/2026_06_25_162332_create_newspapers_table.php
大小:938 B · 修改:2026-06-25 22:24:08 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateNewspapersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('newspapers', function (Blueprint $table) { $table->id(); $table->date('publish_date')->unique(); $table->string('edition_name')->nullable(); $table->string('volume')->nullable(); $table->string('issue_number')->nullable(); $table->enum('status', ['draft', 'published'])->default('published'); $table->text('description')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('newspapers'); } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF