feat: add soft deletes to WorkspaceInvitation model

Invitations were hard-deleted when cancelled, removing the audit trail.
Add SoftDeletes trait and migration for deleted_at column so cancelled
invitations are retained for auditing purposes.

Fixes #22

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-03-24 13:36:46 +00:00
parent c51e4310b1
commit 940d59770d
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Add soft deletes to workspace invitations for audit trail.
*/
public function up(): void
{
Schema::table('workspace_invitations', function (Blueprint $table) {
$table->softDeletes();
});
}
public function down(): void
{
Schema::table('workspace_invitations', function (Blueprint $table) {
$table->dropSoftDeletes();
});
}
};