Files
cv4/database/migrations/2024_12_20_231732_create_chapters_table.php
2024-12-27 20:43:18 -05:00

27 lines
627 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
{
Schema::create('chapters', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('comic_id')->index();
$table->uuid('chapter_uuid')->unique();
$table->string('name');
$table->integer('order');
$table->date('upstream_created_at');
$table->json('metadata');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('chapters');
}
};