leave type module setup
This commit is contained in:
@ -11,11 +11,12 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('leaves', function (Blueprint $table) {
|
||||
Schema::create('tbl_leaves', function (Blueprint $table) {
|
||||
$table->tinyInteger('leave_id')->unsigned()->autoIncrement();
|
||||
$table->integer('employee_id');
|
||||
$table->date('start_date');
|
||||
$table->date('end_date');
|
||||
$table->unsignedBigInteger('employee_id');
|
||||
$table->unsignedBigInteger('leave_type_id');
|
||||
$table->date('start_date')->nullable();
|
||||
$table->date('end_date')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
@ -25,6 +26,6 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('leaves');
|
||||
Schema::dropIfExists('tbl_leaves');
|
||||
}
|
||||
};
|
||||
|
@ -0,0 +1,31 @@
|
||||
<?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_leave_types', function (Blueprint $table) {
|
||||
$table->tinyInteger('leave_type_id')->unsigned()->autoIncrement();
|
||||
$table->string('title');
|
||||
$table->integer('status')->default(11);
|
||||
$table->integer('createdBy')->nullable();
|
||||
$table->integer('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_leave_types');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user