<?php

use Illuminate\Support\Facades\Schema;

test('song_slides belongs to song_sections after migration', function () {
    expect(Schema::hasColumn('song_slides', 'song_section_id'))->toBeTrue();
    expect(Schema::hasColumn('song_slides', 'label_id'))->toBeFalse();
    expect(Schema::hasColumn('song_slides', 'song_group_id'))->toBeFalse();
});

test('song_sections table exists with expected columns', function () {
    expect(Schema::hasTable('song_sections'))->toBeTrue();
    expect(Schema::hasColumns('song_sections', ['id', 'song_id', 'label_id', 'order', 'created_at', 'updated_at']))->toBeTrue();
});

test('song_arrangement_groups table is dropped', function () {
    expect(Schema::hasTable('song_arrangement_groups'))->toBeFalse();
});

test('song_arrangement_labels table exists with expected columns', function () {
    expect(Schema::hasTable('song_arrangement_labels'))->toBeTrue();
    expect(Schema::hasColumns('song_arrangement_labels', ['id', 'song_arrangement_id', 'song_section_id', 'order', 'created_at', 'updated_at']))->toBeTrue();
    expect(Schema::hasColumn('song_arrangement_labels', 'label_id'))->toBeFalse();
});

test('song_groups table is dropped', function () {
    expect(Schema::hasTable('song_groups'))->toBeFalse();
});
