<?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::table('songs', function (Blueprint $table) {
            $table->string('cts_song_id')->nullable()->index()->after('ccli_id');
        });

        Schema::table('service_songs', function (Blueprint $table) {
            $table->string('cts_song_id')->nullable()->after('cts_ccli_id');
        });
    }

    public function down(): void
    {
        Schema::table('service_songs', function (Blueprint $table) {
            $table->dropColumn('cts_song_id');
        });

        Schema::table('songs', function (Blueprint $table) {
            $table->dropColumn('cts_song_id');
        });
    }
};
