CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('employee_attendances', function (Blueprint $table) {
$table->id();
$table->foreignId('employee_id')->constrained('employee_registrations')->cascadeOnDelete();
$table->date('attendance_date');
$table->string('attendance_id');
$table->time('attendance_in_time')->nullable();
$table->time('attendance_out_time')->nullable();
$table->decimal('working_hours',5,2)->nullable();
$table->tinyInteger('status');
$table->string('created_by')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('employee_attendances');
}
};