first commit
This commit is contained in:
0
Modules/Attendance/database/migrations/.gitkeep
Normal file
0
Modules/Attendance/database/migrations/.gitkeep
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_attendances', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('attendance_id')->autoIncrement();
|
||||
$table->unsignedBigInteger('employee_id')->nullable();
|
||||
$table->time('clock_in_time')->nullable();
|
||||
$table->time('clock_out_time')->nullable();
|
||||
$table->string('clock_in_ip')->nullable();
|
||||
$table->string('clock_out_ip')->nullable();
|
||||
$table->string('work_from_type')->nullable();
|
||||
$table->date('date')->nullable();
|
||||
$table->integer('total_hours')->nullable();
|
||||
$table->integer('status')->default(11);
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_attendances');
|
||||
}
|
||||
};
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('tbl_attendances', function (Blueprint $table) {
|
||||
$table->string('type')->nullable()->after('work_from_type');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('tbl_attendances', function (Blueprint $table) {
|
||||
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user