Auto-formatted by Laravel Pint (default Laravel preset): string concatenation spacing, anonymous class brace placement, constructor body shorthand, import ordering, and assertion indentation.
31 lines
921 B
PHP
31 lines
921 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('songs', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('ccli_id')->nullable()->unique()->index();
|
|
$table->string('title');
|
|
$table->string('author')->nullable();
|
|
$table->string('copyright_text')->nullable();
|
|
$table->string('copyright_year')->nullable();
|
|
$table->string('publisher')->nullable();
|
|
$table->boolean('has_translation')->default(false);
|
|
$table->timestamp('last_used_at')->nullable();
|
|
$table->softDeletes();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('songs');
|
|
}
|
|
};
|