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:
@@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user