2023-07-21 09:37:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
|
|
|
return new class extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('approvals', function (Blueprint $table) {
|
|
|
|
$table->id();
|
|
|
|
$table->string("method", 50);
|
2023-08-10 04:35:07 +00:00
|
|
|
$table->string('menu', 50);
|
2023-07-21 09:37:19 +00:00
|
|
|
$table->json('new_request')->nullable();
|
|
|
|
$table->json('old_request')->nullable();
|
|
|
|
$table->string("description", 255)->nullable();
|
|
|
|
$table->string('status', 1)->default(0)->nullable();
|
|
|
|
$table->timestamps();
|
|
|
|
$table->timestamp('approved_at')->nullable();
|
|
|
|
$table->softDeletes();
|
|
|
|
|
|
|
|
$table->unsignedBigInteger('created_by')->nullable();
|
|
|
|
$table->unsignedBigInteger('updated_by')->nullable();
|
|
|
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
|
|
|
$table->unsignedBigInteger('approved_by')->nullable();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('approvals');
|
|
|
|
}
|
|
|
|
};
|