Files
ficheagent/database/migrations/2026_02_15_091553_create_agents_table.php

37 lines
965 B
PHP

<?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('agents', function (Blueprint $table) {
$table->id();
$table->string('first_name');
$table->string('last_name');
$table->string('email')->unique();
$table->string('position');
$table->string('department');
$table->date('arrival_date');
$table->string('integration_status');
$table->foreignId('created_by')->constrained('users');
$table->timestamp('validated_by_rh_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('agents');
}
};