CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSalaryCalculationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('salary_calculations', function (Blueprint $table) {
$table->id();
$table->foreignId('employee_id')->constrained('employee_registrations')->cascadeOnDelete();
$table->string('salary_group_name')->nullable();
$table->string('month');
$table->string('year');
$table->string('payrole_type')->nullable();
$table->foreignId('payrole_item_id')->constrained('payroll_items');
$table->string('payroll_item_name')->nullable();
$table->string('payroll_item_sort_name')->nullable();
$table->decimal('amount',10,2)->nullable();
$table->tinyInteger('status')->default('1');
$table->string('created_by')->nullable();
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('salary_calculations');
}
}