redo-ensemble-table #1
|
|
@ -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
|
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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue