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:
parent
c51e4310b1
commit
940d59770d
1 changed files with 27 additions and 0 deletions
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue