AI Analysis: JobPosition infrastructure and candidate association

This commit is contained in:
jeremy bayse
2026-03-22 22:22:45 +01:00
parent 2df0d6def0
commit 878f4bb102
12 changed files with 470 additions and 6 deletions

View File

@@ -0,0 +1,30 @@
<?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('job_positions', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('description');
$table->json('requirements')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('job_positions');
}
};

View File

@@ -0,0 +1,28 @@
<?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::table('candidates', function (Blueprint $table) {
$table->foreignId('job_position_id')->nullable()->after('user_id')->constrained()->onDelete('set null');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('candidates', function (Blueprint $table) {
$table->dropConstrainedForeignId('job_position_id');
});
}
};