mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-10-30 19:23:57 +01:00
42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Models\BaseModel;
|
|
use App\Models\Wiki\Artist;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up(): void
|
|
{
|
|
if (! Schema::hasTable(Artist::TABLE)) {
|
|
Schema::create(Artist::TABLE, function (Blueprint $table) {
|
|
$table->id(Artist::ATTRIBUTE_ID);
|
|
$table->timestamps(6);
|
|
$table->softDeletes(BaseModel::ATTRIBUTE_DELETED_AT, 6);
|
|
$table->string(Artist::ATTRIBUTE_SLUG);
|
|
$table->string(Artist::ATTRIBUTE_NAME);
|
|
$table->text(Artist::ATTRIBUTE_INFORMATION)->nullable();
|
|
});
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists(Artist::TABLE);
|
|
}
|
|
};
|