redo-ensemble-table #1

Merged
matt merged 4 commits from redo-ensemble-table into main 2026-01-02 02:40:10 +00:00
2 changed files with 32 additions and 4 deletions
Showing only changes of commit b50148ff08 - Show all commits

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
{
$defaults = [
['name' => 'High School', 'set_count' => 4],
['name' => 'Junior High', 'set_count' => 3],
['name' => 'Seventh Grade', 'set_count' => 1],
['name' => 'Jazz', 'set_count' => 3],
['name' => 'High School', 'set_count' => 4, 'abbreviation' => 'HS'],
['name' => 'Junior High', 'set_count' => 3 , 'abbreviation' => 'JH'],
['name' => 'Seventh Grade', 'set_count' => 1, 'abbreviation' => '7th'],
['name' => 'Jazz', 'set_count' => 3, 'abbreviation' => 'Jazz'],
];
Ensemble::insert($defaults);
}