
PK 
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('employee_tds', function (Blueprint $table) {
$table->id();
$table->foreignId('employee_id')
->constrained('employees')
->cascadeOnDelete();
$table->foreignId('payroll_id')
->constrained('payrolls')
->cascadeOnDelete();
$table->string('financial_year', 9);
$table->unsignedTinyInteger('month');
$table->decimal('taxable_income', 15, 2);
$table->decimal('tds_amount', 15, 2);
$table->timestamps();
$table->unique(
['employee_id', 'month', 'financial_year'],
'emp_month_fy_unique'
);
});
}
public function down(): void
{
Schema::dropIfExists('employee_tds');
}
};


PK 99