Skip to content

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.

fix: database schema

Andras Bacsai66bc03b4cdad
diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.php
index cc561ee509..1067d00285 100644
--- a/app/Jobs/ContainerStatusJob.php
+++ b/app/Jobs/ContainerStatusJob.php
@@ -74,8 +74,7 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
$containers = format_docker_command_output_to_json($containers);
$applications = $this->server->applications();
$databases = $this->server->databases();
- // $services = $this->server->services();
- $services = collect([]);
+ $services = $this->server->services();
$previews = $this->server->previews();
/// Check if proxy is running
diff --git a/database/migrations/2023_03_27_083621_create_services_table.php b/database/migrations/2023_03_27_083621_create_services_table.php
index a363d21197..12bb77b1ba 100644
--- a/database/migrations/2023_03_27_083621_create_services_table.php
+++ b/database/migrations/2023_03_27_083621_create_services_table.php
@@ -16,7 +16,8 @@ return new class extends Migration
$table->string('uuid')->unique();
$table->string('name');
- $table->foreignId('server_id')->nullable();
+ $table->morphs('destination');
+
$table->foreignId('environment_id');
$table->timestamps();
});
diff --git a/database/migrations/2023_09_20_082541_update_services_table.php b/database/migrations/2023_09_20_082541_update_services_table.php
index 959d5e6fd3..8c6b350f7f 100644
--- a/database/migrations/2023_09_20_082541_update_services_table.php
+++ b/database/migrations/2023_09_20_082541_update_services_table.php
@@ -12,6 +12,7 @@ return new class extends Migration
public function up(): void
{
Schema::table('services', function (Blueprint $table) {
+ $table->foreignId('server_id')->nullable();
$table->longText('description')->nullable();
$table->longText('docker_compose_raw');
$table->longText('docker_compose')->nullable();
@@ -25,6 +26,7 @@ return new class extends Migration
public function down(): void
{
Schema::table('services', function (Blueprint $table) {
+ $table->dropColumn('server_id');
$table->dropColumn('description');
$table->dropColumn('docker_compose_raw');
$table->dropColumn('docker_compose');