Add abbreviation column to ensemble

This commit is contained in:
Matt Young 2026-01-01 00:43:54 -06:00
parent ee7cb96d03
commit b50148ff08
2 changed files with 32 additions and 4 deletions

View File

@ -0,0 +1,28 @@
<?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::table('ensembles', function (Blueprint $table) {
$table->string('abbreviation')->nullable()->after('name');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ensembles', function (Blueprint $table) {
$table->dropColumn('abbreviation');
});
}
};

View File

@ -13,10 +13,10 @@ class EnsembleSeeder extends Seeder
public function run(): void public function run(): void
{ {
$defaults = [ $defaults = [
['name' => 'High School', 'set_count' => 4], ['name' => 'High School', 'set_count' => 4, 'abbreviation' => 'HS'],
['name' => 'Junior High', 'set_count' => 3], ['name' => 'Junior High', 'set_count' => 3 , 'abbreviation' => 'JH'],
['name' => 'Seventh Grade', 'set_count' => 1], ['name' => 'Seventh Grade', 'set_count' => 1, 'abbreviation' => '7th'],
['name' => 'Jazz', 'set_count' => 3], ['name' => 'Jazz', 'set_count' => 3, 'abbreviation' => 'Jazz'],
]; ];
Ensemble::insert($defaults); Ensemble::insert($defaults);
} }