Perbarui tabel persetujuan_penawaran
Menghapus kolom attachment dan menambahkan kolom file_persetujuan_penawaran, surat_representasi, dan bukti_bayar pada tabel persetujuan_penawaran. Juga menghapus foreign key 'region_id' yang terkait dengan kolom attachment.
This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class UpdatePersetujuanPenawaranTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('persetujuan_penawaran', function (Blueprint $table) {
|
||||||
|
// Drop the existing attachment column
|
||||||
|
$table->dropForeign(['region_id']);
|
||||||
|
$table->dropColumn('attachment');
|
||||||
|
|
||||||
|
// Add new columns for file attachments
|
||||||
|
$table->string('file_persetujuan_penawaran')->nullable();
|
||||||
|
$table->string('surat_representasi')->nullable();
|
||||||
|
$table->string('bukti_bayar')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('persetujuan_penawaran', function (Blueprint $table) {
|
||||||
|
// Reverse the changes
|
||||||
|
$table->string('attachment')->nullable();
|
||||||
|
|
||||||
|
$table->dropColumn('file_persetujuan_penawaran');
|
||||||
|
$table->dropColumn('surat_representasi');
|
||||||
|
$table->dropColumn('bukti_bayar');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user