feat: add soft deletes to WorkspaceInvitation model #68
2 changed files with 29 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();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -8,6 +8,7 @@ use Core\Tenant\Database\Factories\WorkspaceInvitationFactory;
|
|||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
|
@ -16,6 +17,7 @@ class WorkspaceInvitation extends Model
|
|||
{
|
||||
use HasFactory;
|
||||
use Notifiable;
|
||||
use SoftDeletes;
|
||||
|
||||
protected static function newFactory(): WorkspaceInvitationFactory
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue