KTV/database/migrations/2025_04_23_031630_create_songs_table.php

47 lines
2.1 KiB
PHP
Raw Normal View History

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('songs', function (Blueprint $table) {
$table->bigIncrements('id')->comment('歌曲編號');
$table->text('name')->nullable()->comment('歌曲檔名');
$table->string('filename')->comment('歌曲檔名');
$table->date('adddate')->comment('新增日期');
$table->enum('language_type', ['未定義','國語','台語','英語','日語','粵語','韓語','越語','客語','其他'])->default('未定義')->comment('語別');
2025-04-25 09:33:28 +08:00
$table->integer('db_change')->default(0)->comment('DB加減');
$table->tinyInteger('vocal')->comment('人聲'); // 0,1
$table->enum('situation', ['未定義','浪漫', '柔和','動感','明亮'])->default('未定義')->comment('情境');
2025-04-25 09:33:28 +08:00
$table->string('copyright01')->nullable()->comment('版權01');
$table->string('copyright02')->nullable()->comment('版權02');
$table->string('note01')->nullable()->comment('備註01');
$table->string('note02')->nullable()->comment('備註02');
$table->string('note03')->nullable()->comment('備註03');
$table->string('note04')->nullable()->comment('備註04');
$table->tinyInteger('enable')->default(1)->comment('狀態'); // 1,可看0,不可看
$table->string('simplified')->comment('歌曲簡體');
2025-04-25 09:33:28 +08:00
$table->string('phonetic_abbr')->comment('歌曲注音');
$table->string('pinyin_abbr')->comment('歌曲拼音');
$table->integer('strokes_abbr')->default(0)->comment('歌曲筆劃');
$table->integer('song_counts')->default(0)->comment('點播次數');
2025-04-25 09:33:28 +08:00
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('songs');
}
};