Files
animethemes-server/database/migrations/2026_07_09_030526_add_anime_dates.php
T
2026-07-09 14:04:08 -03:00

25 lines
677 B
PHP

<?php
declare(strict_types=1);
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
{
if (! Schema::hasColumns('anime', ['start_date', 'end_date'])) {
Schema::table('anime', function (Blueprint $table) {
$table->char('start_date', 8)->nullable()->after('year');
$table->char('end_date', 8)->nullable()->after('start_date');
$table->text('mod_notes')->nullable()->after('synopsis');
});
}
}
};