KTV/database/migrations/2025_04_23_031630_create_songs_table.php
allen.yan d9924bf05b 加入 ⻆色權限控制
修正 'n' => 'ㄣ' 轉值問題
加入 歌手搜尋功能
DB 開 點播次數欄位
20250505
2025-05-05 11:22:40 +08:00

47 lines
2.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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('語別');
$table->integer('db_change')->default(0)->comment('DB加減');
$table->tinyInteger('vocal')->comment('人聲'); // 0,1
$table->enum('situation', ['未定義','浪漫', '柔和','動感','明亮'])->default('未定義')->comment('情境');
$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('歌曲簡體');
$table->string('phonetic_abbr')->comment('歌曲注音');
$table->string('pinyin_abbr')->comment('歌曲拼音');
$table->integer('strokes_abbr')->default(0)->comment('歌曲筆劃');
$table->integer('song_counts')->default(0)->comment('點播次數');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('songs');
}
};