25 lines
619 B
PHP
25 lines
619 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
// 表名按要求为 birds
|
|
Schema::create('birds', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('title', 255)->comment('鸟类标题');
|
|
$table->text('markdown_content')->comment('Markdown原始文本');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('birds');
|
|
}
|
|
};
|