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: 4.0.0-beta.37

Andras Bacsaif4f3034389d8
diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php
index 719c06df3c..25aa497d93 100644
--- a/database/seeders/ProductionSeeder.php
+++ b/database/seeders/ProductionSeeder.php
@@ -11,6 +11,9 @@ use App\Models\InstanceSettings;
use App\Models\PrivateKey;
use App\Models\Server;
use App\Models\StandaloneDocker;
+use App\Models\Team;
+use App\Models\User;
+use DB;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Process;
use Illuminate\Support\Facades\Storage;
@@ -19,6 +22,18 @@ class ProductionSeeder extends Seeder
{
public function run(): void
{
+ // Fix for 4.0.0-beta.37
+ if (User::find(0) !== null && Team::find(0) !== null) {
+ if (DB::table('team_user')->where('user_id', 0)->first() === null) {
+ DB::table('team_user')->insert([
+ 'user_id' => 0,
+ 'team_id' => 0,
+ 'role' => 'owner',
+ 'created_at' => now(),
+ 'updated_at' => now(),
+ ]);
+ }
+ }
if (InstanceSettings::find(0) == null) {
InstanceSettings::create([
'id' => 0