fix(seeder): standardize branch names to uppercase in BranchesSeeder #5

Merged
sholahuddin merged 1 commits from shola into master 2025-12-23 15:40:49 +07:00
2 changed files with 37 additions and 37 deletions
Showing only changes of commit 8d7a8d0fc7 - Show all commits

View File

@@ -1,39 +1,39 @@
<?php <?php
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class extends Migration { return new class extends Migration {
/** /**
* Run the migrations. * Run the migrations.
*/ */
public function up() public function up(): void
: void {
{ Schema::create('branches', function (Blueprint $table) {
Schema::create('branches', function (Blueprint $table) { $table->id();
$table->id(); $table->string('code', 9)->unique();
$table->string('code', 9)->unique(); $table->string('name');
$table->string('name'); $table->boolean('status')->default(true)->nullable();
$table->boolean('status')->default(true)->nullable(); $table->timestamps();
$table->timestamps(); $table->timestamp('authorized_at')->nullable();
$table->timestamp('authorized_at')->nullable(); $table->char('authorized_status', 1)->nullable();
$table->char('authorized_status', 1)->nullable(); $table->softDeletes();
$table->softDeletes();
$table->unsignedBigInteger('created_by')->nullable(); $table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable(); $table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable(); $table->unsignedBigInteger('deleted_by')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable(); $table->unsignedBigInteger('authorized_by')->nullable();
}); });
} }
/** /**
* Reverse the migrations. * Reverse the migrations.
*/ */
public function down() public function down(): void
: void {
{ Schema::disableForeignKeyConstraints();
Schema::dropIfExists('branches'); Schema::dropIfExists('branches');
} Schema::enableForeignKeyConstraints();
}; }
};

View File

@@ -186,7 +186,7 @@ class BranchesSeeder extends Seeder
], ],
[ [
'code' => 'ID0010031', 'code' => 'ID0010031',
'name' => 'BKR Bandung - KCP', 'name' => 'BKR BANDUNG - KCP',
'status' => true, 'status' => true,
'created_at' => $now, 'created_at' => $now,
'updated_at' => $now 'updated_at' => $now
@@ -319,7 +319,7 @@ class BranchesSeeder extends Seeder
], ],
[ [
'code' => 'ID0010063', 'code' => 'ID0010063',
'name' => 'Diponegoro Denpasar KK', 'name' => 'DIPONEGORO DENPASAR KK',
'status' => true, 'status' => true,
'created_at' => $now, 'created_at' => $now,
'updated_at' => $now 'updated_at' => $now
@@ -704,7 +704,7 @@ class BranchesSeeder extends Seeder
], ],
[ [
'code' => 'ID0010272', 'code' => 'ID0010272',
'name' => 'Setiabudi Kuningan KK', 'name' => 'SETIABUDI KUNINGAN KK',
'status' => true, 'status' => true,
'created_at' => $now, 'created_at' => $now,
'updated_at' => $now 'updated_at' => $now