e29a5891c8
Reviewed-on: #5 Co-authored-by: ISMAIL MASSERAN <ismail@koppkb.com> Co-committed-by: ISMAIL MASSERAN <ismail@koppkb.com>
55 lines
1.6 KiB
PHP
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')->nullable();
|
|
$table->timestamps();
|
|
$table->integer('status')->nullable(); // new added
|
|
$table->string('file_type')->nullable();
|
|
|
|
// $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');
|
|
}
|
|
}
|