An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
refactor(webhook): remove Webhook model and related logic; add migrations to drop webhooks and kubernetes tables
Andras Bacsaid9ebf3b14242
diff --git a/app/Http/Controllers/Webhook/Stripe.php b/app/Http/Controllers/Webhook/Stripe.phpindex 83ba16699a..ae50aac429 100644--- a/app/Http/Controllers/Webhook/Stripe.php+++ b/app/Http/Controllers/Webhook/Stripe.php@@ -4,15 +4,12 @@ namespace App\Http\Controllers\Webhook;use App\Http\Controllers\Controller;use App\Jobs\StripeProcessJob;-use App\Models\Webhook;use Exception;use Illuminate\Http\Request;use Illuminate\Support\Facades\Storage;class Stripe extends Controller{- protected $webhook;-public function events(Request $request){try {@@ -40,19 +37,10 @@ class Stripe extends Controllerreturn response('Webhook received. Cool cool cool cool cool.', 200);}- $this->webhook = Webhook::create([- 'type' => 'stripe',- 'payload' => $request->getContent(),- ]);StripeProcessJob::dispatch($event);return response('Webhook received. Cool cool cool cool cool.', 200);} catch (Exception $e) {- $this->webhook->update([- 'status' => 'failed',- 'failure_reason' => $e->getMessage(),- ]);-return response($e->getMessage(), 400);}}diff --git a/app/Models/Kubernetes.php b/app/Models/Kubernetes.phpdeleted file mode 100644index 174cb5bc86..0000000000--- a/app/Models/Kubernetes.php+++ /dev/null@@ -1,5 +0,0 @@-<?php--namespace App\Models;--class Kubernetes extends BaseModel {}diff --git a/app/Models/Webhook.php b/app/Models/Webhook.phpdeleted file mode 100644index 8e2b629558..0000000000--- a/app/Models/Webhook.php+++ /dev/null@@ -1,15 +0,0 @@-<?php--namespace App\Models;--use Illuminate\Database\Eloquent\Model;--class Webhook extends Model-{- protected $guarded = [];-- protected $casts = [- 'type' => 'string',- 'payload' => 'encrypted',- ];-}diff --git a/database/migrations/2025_09_10_172952_remove_is_readonly_from_local_persistent_volumes_table.php b/database/migrations/2025_09_10_172952_remove_is_readonly_from_local_persistent_volumes_table.phpnew file mode 100644index 0000000000..31398bd355--- /dev/null+++ b/database/migrations/2025_09_10_172952_remove_is_readonly_from_local_persistent_volumes_table.php@@ -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('local_persistent_volumes', function (Blueprint $table) {+ $table->dropColumn('is_readonly');+ });+ }++ /**+ * Reverse the migrations.+ */+ public function down(): void+ {+ Schema::table('local_persistent_volumes', function (Blueprint $table) {+ $table->boolean('is_readonly')->default(false);+ });+ }+};diff --git a/database/migrations/2025_09_10_173300_drop_webhooks_table.php b/database/migrations/2025_09_10_173300_drop_webhooks_table.phpnew file mode 100644index 0000000000..4cb1b4e701--- /dev/null+++ b/database/migrations/2025_09_10_173300_drop_webhooks_table.php@@ -0,0 +1,31 @@+<?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::dropIfExists('webhooks');+ }++ /**+ * Reverse the migrations.+ */+ public function down(): void+ {+ Schema::create('webhooks', function (Blueprint $table) {+ $table->id();+ $table->enum('status', ['pending', 'success', 'failed'])->default('pending');+ $table->string('type');+ $table->longText('payload');+ $table->longText('failure_reason')->nullable();+ $table->timestamps();+ });+ }+};diff --git a/database/migrations/2025_09_10_173402_drop_kubernetes_table.php b/database/migrations/2025_09_10_173402_drop_kubernetes_table.phpnew file mode 100644index 0000000000..329ed0e7e2--- /dev/null+++ b/database/migrations/2025_09_10_173402_drop_kubernetes_table.php@@ -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::dropIfExists('kubernetes');+ }++ /**+ * Reverse the migrations.+ */+ public function down(): void+ {+ Schema::create('kubernetes', function (Blueprint $table) {+ $table->id();+ $table->string('uuid')->unique();+ $table->timestamps();+ });+ }+};