CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLeaveEncashmentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('leave_encashments', function (Blueprint $table) {
$table->id();
$table->string('employee_id');
$table->foreignId('leave_type_id')->constrained('leave_types')->cascadeOnDelete();
$table->string('encash_days');
$table->string('encash_remark');
$table->tinyInteger('status')->default('1');
$table->string('created_by')->nullable();
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('leave_encashments');
}
}