mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
feat: song native title (#979)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user