Add Soft Deletes to webhooks config table (#670)

This commit is contained in:
MartinOscar 2024-10-27 05:42:08 +01:00 committed by GitHub
parent 590569a131
commit a70a060350
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 30 additions and 1 deletions

View File

@ -5,11 +5,12 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\File;
class WebhookConfiguration extends Model class WebhookConfiguration extends Model
{ {
use HasFactory; use HasFactory, SoftDeletes;
protected $fillable = [ protected $fillable = [
'endpoint', 'endpoint',

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('webhook_configurations', function (Blueprint $table) {
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('webhook_configurations', function (Blueprint $table) {
$table->dropSoftDeletes();
});
}
};