Add abbreviation column to ensemble
This commit is contained in:
parent
ee7cb96d03
commit
b50148ff08
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue