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