CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAssignDepartmentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('assign_departments', function (Blueprint $table) {
$table->id();
$table->foreignId('employee_id')->constrained('employee_registrations')->cascadeOnDelete();
$table->date('effective_date');
$table->string('designation')->nullable();
$table->foreignId('role_id')->constrained('roles');
$table->foreignId('team_id')->nullable();
$table->foreignId('manager_id')->nullable();
$table->foreignId('hr_id')->nullable();
$table->foreignId('fi_manager_id')->nullable();
$table->foreignId('attendance_type_id')->constrained('attendance_types');
$table->string('salary_group')->nullable();
$table->decimal('annual_ctc_amount', 12, 2)->nullable();
$table->decimal('annual_cash_in_hand_amount')->nullable();
$table->decimal('total_gross_amount')->nullable();
$table->decimal('total_deduction_amount')->nullable();
$table->decimal('net_amount')->nullable();
$table->decimal('monthly_ctc_amount')->nullable();
$table->decimal('difference_percentage')->nullable();
$table->string('status');
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('assign_departments');
}
}