Files
lelong/database/migrations/2022_03_09_122631_create_tangguhlelong_table.php
T
nishaMuhd 664151e866 function tangguh lelong
add function tangguhlelong, migrate table tangguhlelong
2022-10-10 16:28:52 +08:00

55 lines
1.6 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTangguhlelongTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tangguhlelong', function (Blueprint $table) {
$table->id();
$table->string('kodcaw');
$table->unsignedBigInteger('lelong_id')->unsigned();
$table->unsignedBigInteger('lelongbid_id')->unsigned();
$table->string('norujukan');
$table->string('pinjaman', $precision = 9, $scale = 2);
$table->datetime('tarikhtangguh')->nullable();
$table->integer('ditangguh_oleh');
$table->datetime('ditangguh_pada');
$table->string('nota');
$table->timestamps();
$table->integer('status'); //new added
$table->string('filetype');
// $table->foreign('lelong_id')
// ->references('id')->on('lelong')
// ->onDelete('cascade');
// $table->foreign('lelongbid_id')
// ->references('id')->on('lelongbid')
// ->onDelete('cascade');
});
// once the table is created use a raw query to ALTER it and add the MEDIUMBLOB
DB::statement("ALTER TABLE tangguhlelong ADD filename LONGBLOB");
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tangguhlelong');
}
}