CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMonthlyAttendancesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('monthly_attendances', function (Blueprint $table) {
$table->id();
$table->string('employee_id');
$table->string('employee_name');
$table->string('start_date');
$table->string('end_date');
// $table->string('month');
$table->integer('total_days');
$table->integer('od_days');
$table->integer('travel_days');
$table->integer('wfh_days');
$table->integer('late_days');
$table->integer('punch_days');
$table->integer('leave_days');
$table->integer('working_days');
$table->integer('attendance');
$table->decimal('total_hours',10,2);
$table->decimal('total_worked_hours',10,2);
$table->decimal('leave_hours',10,2);
$table->integer('lop_days');
$table->tinyInteger('status')->default('1');
$table->string('created_by')->nullable();
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('monthly_attendances');
}
}