feat: song native title (#979)

This commit is contained in:
Kyrch
2025-10-24 03:31:00 -03:00
committed by GitHub
parent 6721443646
commit 4a7b960d34
12 changed files with 154 additions and 4 deletions
+1
View File
@@ -31,6 +31,7 @@ class SongFactory extends Factory
{
return [
Song::ATTRIBUTE_TITLE => fake()->words(3, true),
Song::ATTRIBUTE_TITLE_NATIVE => fake()->words(3, true),
];
}
}
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
use App\Models\Wiki\Song;
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::hasColumn(Song::TABLE, Song::ATTRIBUTE_TITLE_NATIVE)) {
Schema::table(Song::TABLE, function (Blueprint $table) {
$table->string(Song::ATTRIBUTE_TITLE_NATIVE)->nullable()->after(Song::ATTRIBUTE_TITLE);
});
}
}
};