feat(webstatement): tambahkan kolom dealer_desk pada model dan tabel tellers

- Menambahkan atribut baru `dealer_desk` pada properti `$fillable` di model `Teller` untuk memungkinkan atribut ini diisi secara massal.
- Membuat migration baru `2025_05_29_024729_add_dealer_desk_to_tellers_table` untuk penambahan kolom `dealer_desk` ke dalam tabel `tellers`.
  - Kolom `dealer_desk` bertipe string dan dapat bernilai null.
  - Penempatan kolom dilakukan setelah kolom `last_version`.
- Menambahkan method untuk rollback migration yang menghapus kolom `dealer_desk` dari tabel `tellers`.

Signed-off-by: Daeng Deni Mardaeni <ddeni05@gmail.com>
This commit is contained in:
Daeng Deni Mardaeni
2025-05-29 09:47:57 +07:00
parent 1ae98bcc26
commit deb702c68e
2 changed files with 30 additions and 1 deletions

View File

@@ -112,6 +112,7 @@
'amount_fcy_2',
'rate_2',
'customer_1',
'last_version'
'last_version',
'dealer_desk'
];
}

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('tellers', function (Blueprint $table) {
$table->string('dealer_desk')->nullable()->after('last_version');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('tellers', function (Blueprint $table) {
$table->dropColumn('dealer_desk');
});
}
};