2025-04-25 09:33:28 +08:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
Schema::create('artists', function (Blueprint $table) {
|
|
|
|
|
$table->bigIncrements('id');
|
2025-05-09 13:01:23 +08:00
|
|
|
|
$table->enum('category', ['未定義','男', '女','團','外', '其他'])->default('未定義')->index()->comment('歌星類別');
|
|
|
|
|
$table->string('name')->unique()->comment('歌星名稱');
|
|
|
|
|
$table->string('simplified')->index()->comment('歌星簡體');
|
|
|
|
|
$table->string('phonetic_abbr')->index()->comment('歌星注音');
|
|
|
|
|
$table->string('pinyin_abbr')->index()->comment('歌星拼音');
|
|
|
|
|
$table->integer('strokes_abbr')->index()->comment('歌星筆劃');
|
2025-05-06 13:04:32 +08:00
|
|
|
|
$table->tinyInteger('enable')->default(1)->comment('狀態'); // 1,可看,0,不可看
|
2025-04-25 09:33:28 +08:00
|
|
|
|
$table->timestamps();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*/
|
|
|
|
|
public function down(): void
|
|
|
|
|
{
|
|
|
|
|
Schema::dropIfExists('artists');
|
|
|
|
|
}
|
|
|
|
|
};
|