CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePayrollItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('payroll_items', function (Blueprint $table) {
$table->id();
$table->foreignId('payroll_item_types_id')->constrained('payroll_item_types')->cascadeOnDelete();
$table->string('payroll_item_name');
$table->string('payroll_item_short_name')->nullable();
$table->boolean('attendance_dependent')->nullable();
$table->boolean('taxable')->nullable();
$table->string('earn_deduction')->nullable();
$table->string('depend_payroll_items')->nullable();
$table->decimal('payroll_percentage',10,2)->nullable();
$table->string('payroll_condition')->nullable();
$table->decimal('payroll_condition_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('payroll_items');
}
}