Tambah kolom created_by dan updated_by pada tabel persetujuan_penawaran

Menambahkan dua kolom baru, `created_by` dan `updated_by`, pada tabel `persetujuan_penawaran` untuk menyimpan informasi pengguna yang membuat dan memperbarui data. Kolom-kolom ini bersifat nullable. Selain itu, menyediakan metode untuk menghapus kolom tersebut jika diperlukan.
This commit is contained in:
Daeng Deni Mardaeni
2024-11-21 12:59:59 +07:00
parent 2afa04a82e
commit 050b49af2d

View File

@@ -0,0 +1,30 @@
<?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('persetujuan_penawaran', function (Blueprint $table) {
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('persetujuan_penawaran', function (Blueprint $table) {
$table->dropColumn('created_by');
$table->dropColumn('updated_by');
});
}
};