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
fix(models): replace forceFill/forceCreate with fill/create and add fillable guards
Andras Bacsai1a603a10ed95
diff --git a/app/Actions/Fortify/ResetUserPassword.php b/app/Actions/Fortify/ResetUserPassword.phpindex 158996c909..5baa8b7ed2 100644--- a/app/Actions/Fortify/ResetUserPassword.php+++ b/app/Actions/Fortify/ResetUserPassword.php@@ -21,7 +21,7 @@ class ResetUserPassword implements ResetsUserPasswords'password' => ['required', Password::defaults(), 'confirmed'],])->validate();- $user->forceFill([+ $user->fill(['password' => Hash::make($input['password']),])->save();$user->deleteAllSessions();diff --git a/app/Actions/Fortify/UpdateUserPassword.php b/app/Actions/Fortify/UpdateUserPassword.phpindex 0c51ec56db..320eede0bf 100644--- a/app/Actions/Fortify/UpdateUserPassword.php+++ b/app/Actions/Fortify/UpdateUserPassword.php@@ -24,7 +24,7 @@ class UpdateUserPassword implements UpdatesUserPasswords'current_password.current_password' => __('The provided password does not match your current password.'),])->validateWithBag('updatePassword');- $user->forceFill([+ $user->fill(['password' => Hash::make($input['password']),])->save();}diff --git a/app/Actions/Fortify/UpdateUserProfileInformation.php b/app/Actions/Fortify/UpdateUserProfileInformation.phpindex c8bfd930a6..76c6c0736f 100644--- a/app/Actions/Fortify/UpdateUserProfileInformation.php+++ b/app/Actions/Fortify/UpdateUserProfileInformation.php@@ -35,7 +35,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation) {$this->updateVerifiedUser($user, $input);} else {- $user->forceFill([+ $user->fill(['name' => $input['name'],'email' => $input['email'],])->save();@@ -49,7 +49,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation*/protected function updateVerifiedUser(User $user, array $input): void{- $user->forceFill([+ $user->fill(['name' => $input['name'],'email' => $input['email'],'email_verified_at' => null,diff --git a/app/Actions/Server/InstallDocker.php b/app/Actions/Server/InstallDocker.phpindex 8bb85c7fc7..2e08ec6ad9 100644--- a/app/Actions/Server/InstallDocker.php+++ b/app/Actions/Server/InstallDocker.php@@ -49,7 +49,7 @@ class InstallDocker}');$found = StandaloneDocker::where('server_id', $server->id);if ($found->count() == 0 && $server->id) {- StandaloneDocker::forceCreate([+ StandaloneDocker::create(['name' => 'coolify','network' => 'coolify','server_id' => $server->id,diff --git a/app/Console/Commands/Emails.php b/app/Console/Commands/Emails.phpindex 4621551428..43ba06804c 100644--- a/app/Console/Commands/Emails.php+++ b/app/Console/Commands/Emails.php@@ -136,7 +136,7 @@ class Emails extends Command$application = Application::all()->first();$preview = ApplicationPreview::all()->first();if (! $preview) {- $preview = ApplicationPreview::forceCreate([+ $preview = ApplicationPreview::create(['application_id' => $application->id,'pull_request_id' => 1,'pull_request_html_url' => 'http://example.com',diff --git a/app/Http/Controllers/Api/ProjectController.php b/app/Http/Controllers/Api/ProjectController.phpindex c8638be0d7..ec2e300ffe 100644--- a/app/Http/Controllers/Api/ProjectController.php+++ b/app/Http/Controllers/Api/ProjectController.php@@ -258,7 +258,7 @@ class ProjectController extends Controller], 422);}- $project = Project::forceCreate([+ $project = Project::create(['name' => $request->name,'description' => $request->description,'team_id' => $teamId,diff --git a/app/Http/Controllers/Api/ServicesController.php b/app/Http/Controllers/Api/ServicesController.phpindex 6a742fe1bb..fbf4b9e56f 100644--- a/app/Http/Controllers/Api/ServicesController.php+++ b/app/Http/Controllers/Api/ServicesController.php@@ -432,7 +432,7 @@ class ServicesController extends Controllerif (in_array($oneClickServiceName, NEEDS_TO_CONNECT_TO_PREDEFINED_NETWORK)) {data_set($servicePayload, 'connect_to_docker_network', true);}- $service = Service::forceCreate($servicePayload);+ $service = Service::create($servicePayload);$service->name = $request->name ?? "$oneClickServiceName-".$service->uuid;$service->description = $request->description;if ($request->has('is_container_label_escape_enabled')) {diff --git a/app/Http/Controllers/Webhook/Bitbucket.php b/app/Http/Controllers/Webhook/Bitbucket.phpindex e59bc6ead3..1831867117 100644--- a/app/Http/Controllers/Webhook/Bitbucket.php+++ b/app/Http/Controllers/Webhook/Bitbucket.php@@ -119,7 +119,7 @@ class Bitbucket extends Controller$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {- $pr_app = ApplicationPreview::forceCreate([+ $pr_app = ApplicationPreview::create(['git_type' => 'bitbucket','application_id' => $application->id,'pull_request_id' => $pull_request_id,@@ -128,7 +128,7 @@ class Bitbucket extends Controller]);$pr_app->generate_preview_fqdn_compose();} else {- $pr_app = ApplicationPreview::forceCreate([+ $pr_app = ApplicationPreview::create(['git_type' => 'bitbucket','application_id' => $application->id,'pull_request_id' => $pull_request_id,diff --git a/app/Http/Controllers/Webhook/Gitea.php b/app/Http/Controllers/Webhook/Gitea.phpindex 6ba4b33cf4..a9d65eae64 100644--- a/app/Http/Controllers/Webhook/Gitea.php+++ b/app/Http/Controllers/Webhook/Gitea.php@@ -144,7 +144,7 @@ class Gitea extends Controller$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {- $pr_app = ApplicationPreview::forceCreate([+ $pr_app = ApplicationPreview::create(['git_type' => 'gitea','application_id' => $application->id,'pull_request_id' => $pull_request_id,@@ -153,7 +153,7 @@ class Gitea extends Controller]);$pr_app->generate_preview_fqdn_compose();} else {- $pr_app = ApplicationPreview::forceCreate([+ $pr_app = ApplicationPreview::create(['git_type' => 'gitea','application_id' => $application->id,'pull_request_id' => $pull_request_id,diff --git a/app/Http/Controllers/Webhook/Gitlab.php b/app/Http/Controllers/Webhook/Gitlab.phpindex fe4f17d9e5..08e5d7162b 100644--- a/app/Http/Controllers/Webhook/Gitlab.php+++ b/app/Http/Controllers/Webhook/Gitlab.php@@ -177,7 +177,7 @@ class Gitlab extends Controller$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found) {if ($application->build_pack === 'dockercompose') {- $pr_app = ApplicationPreview::forceCreate([+ $pr_app = ApplicationPreview::create(['git_type' => 'gitlab','application_id' => $application->id,'pull_request_id' => $pull_request_id,@@ -186,7 +186,7 @@ class Gitlab extends Controller]);$pr_app->generate_preview_fqdn_compose();} else {- $pr_app = ApplicationPreview::forceCreate([+ $pr_app = ApplicationPreview::create(['git_type' => 'gitlab','application_id' => $application->id,'pull_request_id' => $pull_request_id,diff --git a/app/Jobs/ProcessGithubPullRequestWebhook.php b/app/Jobs/ProcessGithubPullRequestWebhook.phpindex 01a5124393..041cd812c7 100644--- a/app/Jobs/ProcessGithubPullRequestWebhook.php+++ b/app/Jobs/ProcessGithubPullRequestWebhook.php@@ -118,7 +118,7 @@ class ProcessGithubPullRequestWebhook implements ShouldBeEncrypted, ShouldQueueif (! $found) {if ($application->build_pack === 'dockercompose') {- $preview = ApplicationPreview::forceCreate([+ $preview = ApplicationPreview::create(['git_type' => 'github','application_id' => $application->id,'pull_request_id' => $this->pullRequestId,@@ -127,7 +127,7 @@ class ProcessGithubPullRequestWebhook implements ShouldBeEncrypted, ShouldQueue]);$preview->generate_preview_fqdn_compose();} else {- $preview = ApplicationPreview::forceCreate([+ $preview = ApplicationPreview::create(['git_type' => 'github','application_id' => $application->id,'pull_request_id' => $this->pullRequestId,diff --git a/app/Livewire/Boarding/Index.php b/app/Livewire/Boarding/Index.phpindex 170f0cdea2..33c75bf706 100644--- a/app/Livewire/Boarding/Index.php+++ b/app/Livewire/Boarding/Index.php@@ -441,7 +441,7 @@ class Index extends Componentpublic function createNewProject(){- $this->createdProject = Project::forceCreate([+ $this->createdProject = Project::create(['name' => 'My first project','team_id' => currentTeam()->id,'uuid' => (string) new Cuid2,diff --git a/app/Livewire/Destination/New/Docker.php b/app/Livewire/Destination/New/Docker.phpindex 1412355901..6f9b6f9950 100644--- a/app/Livewire/Destination/New/Docker.php+++ b/app/Livewire/Destination/New/Docker.php@@ -77,7 +77,7 @@ class Docker extends Componentif ($found) {throw new \Exception('Network already added to this server.');} else {- $docker = SwarmDocker::forceCreate([+ $docker = SwarmDocker::create(['name' => $this->name,'network' => $this->network,'server_id' => $this->selectedServer->id,@@ -88,7 +88,7 @@ class Docker extends Componentif ($found) {throw new \Exception('Network already added to this server.');} else {- $docker = StandaloneDocker::forceCreate([+ $docker = StandaloneDocker::create(['name' => $this->name,'network' => $this->network,'server_id' => $this->selectedServer->id,diff --git a/app/Livewire/ForcePasswordReset.php b/app/Livewire/ForcePasswordReset.phpindex 61a2a20e95..e6392497f4 100644--- a/app/Livewire/ForcePasswordReset.php+++ b/app/Livewire/ForcePasswordReset.php@@ -48,7 +48,7 @@ class ForcePasswordReset extends Component$this->rateLimit(10);$this->validate();$firstLogin = auth()->user()->created_at == auth()->user()->updated_at;- auth()->user()->forceFill([+ auth()->user()->fill(['password' => Hash::make($this->password),'force_password_reset' => false,])->save();diff --git a/app/Livewire/Project/AddEmpty.php b/app/Livewire/Project/AddEmpty.phpindex a2581a5c92..974f0608a6 100644--- a/app/Livewire/Project/AddEmpty.php+++ b/app/Livewire/Project/AddEmpty.php@@ -30,7 +30,7 @@ class AddEmpty extends Component{try {$this->validate();- $project = Project::forceCreate([+ $project = Project::create(['name' => $this->name,'description' => $this->description,'team_id' => currentTeam()->id,diff --git a/app/Livewire/Project/Application/Previews.php b/app/Livewire/Project/Application/Previews.phpindex c61a4e4a7d..c887e9b833 100644--- a/app/Livewire/Project/Application/Previews.php+++ b/app/Livewire/Project/Application/Previews.php@@ -196,7 +196,7 @@ class Previews extends Component$this->setDeploymentUuid();$found = ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found && ! is_null($pull_request_html_url)) {- $found = ApplicationPreview::forceCreate([+ $found = ApplicationPreview::create(['application_id' => $this->application->id,'pull_request_id' => $pull_request_id,'pull_request_html_url' => $pull_request_html_url,@@ -210,7 +210,7 @@ class Previews extends Component$this->setDeploymentUuid();$found = ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found && (! is_null($pull_request_html_url) || ($this->application->build_pack === 'dockerimage' && str($docker_registry_image_tag)->isNotEmpty()))) {- $found = ApplicationPreview::forceCreate([+ $found = ApplicationPreview::create(['application_id' => $this->application->id,'pull_request_id' => $pull_request_id,'pull_request_html_url' => $pull_request_html_url ?? '',@@ -262,7 +262,7 @@ class Previews extends Component$this->setDeploymentUuid();$found = ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->first();if (! $found && (! is_null($pull_request_html_url) || ($this->application->build_pack === 'dockerimage' && str($docker_registry_image_tag)->isNotEmpty()))) {- $found = ApplicationPreview::forceCreate([+ $found = ApplicationPreview::create(['application_id' => $this->application->id,'pull_request_id' => $pull_request_id,'pull_request_html_url' => $pull_request_html_url ?? '',diff --git a/app/Livewire/Project/CloneMe.php b/app/Livewire/Project/CloneMe.phpindex 93eb2a78ca..644753c837 100644--- a/app/Livewire/Project/CloneMe.php+++ b/app/Livewire/Project/CloneMe.php@@ -100,7 +100,7 @@ class CloneMe extends Componentif ($foundProject) {throw new \Exception('Project with the same name already exists.');}- $project = Project::forceCreate([+ $project = Project::create(['name' => $this->newName,'team_id' => currentTeam()->id,'description' => $this->project->description.' (clone)',@@ -139,7 +139,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => $uuid,'status' => 'exited','started_at' => null,@@ -188,7 +188,7 @@ class CloneMe extends Component'created_at','updated_at','uuid',- ])->forceFill([+ ])->fill(['name' => $newName,'resource_id' => $newDatabase->id,]);@@ -217,7 +217,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['resource_id' => $newDatabase->id,]);$newStorage->save();@@ -230,7 +230,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => $uuid,'database_id' => $newDatabase->id,'database_type' => $newDatabase->getMorphClass(),@@ -248,7 +248,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill($payload);+ ])->fill($payload);$newEnvironmentVariable->save();}}@@ -259,7 +259,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => $uuid,'environment_id' => $environment->id,'destination_id' => $this->selectedDestination,@@ -277,7 +277,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => (string) new Cuid2,'service_id' => $newService->id,'team_id' => currentTeam()->id,@@ -291,7 +291,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['resourceable_id' => $newService->id,'resourceable_type' => $newService->getMorphClass(),]);@@ -299,7 +299,7 @@ class CloneMe extends Component}foreach ($newService->applications() as $application) {- $application->forceFill([+ $application->fill(['status' => 'exited',])->save();@@ -317,7 +317,7 @@ class CloneMe extends Component'created_at','updated_at','uuid',- ])->forceFill([+ ])->fill(['name' => $newName,'resource_id' => $application->id,]);@@ -346,7 +346,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['resource_id' => $application->id,]);$newStorage->save();@@ -354,7 +354,7 @@ class CloneMe extends Component}foreach ($newService->databases() as $database) {- $database->forceFill([+ $database->fill(['status' => 'exited',])->save();@@ -372,7 +372,7 @@ class CloneMe extends Component'created_at','updated_at','uuid',- ])->forceFill([+ ])->fill(['name' => $newName,'resource_id' => $database->id,]);@@ -401,7 +401,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['resource_id' => $database->id,]);$newStorage->save();@@ -414,7 +414,7 @@ class CloneMe extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => $uuid,'database_id' => $database->id,'database_type' => $database->getMorphClass(),diff --git a/app/Livewire/Project/New/DockerCompose.php b/app/Livewire/Project/New/DockerCompose.phpindex 99fb2efc41..2b92902c6b 100644--- a/app/Livewire/Project/New/DockerCompose.php+++ b/app/Livewire/Project/New/DockerCompose.php@@ -54,7 +54,7 @@ class DockerCompose extends Component}$destination_class = $destination->getMorphClass();- $service = Service::forceCreate([+ $service = Service::create(['docker_compose_raw' => $this->dockerComposeRaw,'environment_id' => $environment->id,'server_id' => (int) $server_id,diff --git a/app/Livewire/Project/New/DockerImage.php b/app/Livewire/Project/New/DockerImage.phpindex 8becdf5850..268333d075 100644--- a/app/Livewire/Project/New/DockerImage.php+++ b/app/Livewire/Project/New/DockerImage.php@@ -133,7 +133,7 @@ class DockerImage extends Component// Determine the image tag based on whether it's a hash or regular tag$imageTag = $parser->isImageHash() ? 'sha256-'.$parser->getTag() : $parser->getTag();- $application = Application::forceCreate([+ $application = Application::create(['name' => 'docker-image-'.new Cuid2,'repository_project_id' => 0,'git_repository' => 'coollabsio/coolify',diff --git a/app/Livewire/Project/New/EmptyProject.php b/app/Livewire/Project/New/EmptyProject.phpindex 1cdc7e0986..0360365a9a 100644--- a/app/Livewire/Project/New/EmptyProject.php+++ b/app/Livewire/Project/New/EmptyProject.php@@ -10,7 +10,7 @@ class EmptyProject extends Component{public function createEmptyProject(){- $project = Project::forceCreate([+ $project = Project::create(['name' => generate_random_name(),'team_id' => currentTeam()->id,'uuid' => (string) new Cuid2,diff --git a/app/Livewire/Project/New/GithubPrivateRepository.php b/app/Livewire/Project/New/GithubPrivateRepository.phpindex 9d4acb9bb6..0222008b01 100644--- a/app/Livewire/Project/New/GithubPrivateRepository.php+++ b/app/Livewire/Project/New/GithubPrivateRepository.php@@ -191,7 +191,7 @@ class GithubPrivateRepository extends Component$project = Project::ownedByCurrentTeam()->where('uuid', $this->parameters['project_uuid'])->firstOrFail();$environment = $project->environments()->where('uuid', $this->parameters['environment_uuid'])->firstOrFail();- $application = Application::forceCreate([+ $application = Application::create(['name' => generate_application_name($this->selected_repository_owner.'/'.$this->selected_repository_repo, $this->selected_branch_name),'repository_project_id' => $this->selected_repository_id,'git_repository' => str($this->selected_repository_owner)->trim()->toString().'/'.str($this->selected_repository_repo)->trim()->toString(),diff --git a/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php b/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.phpindex ba058c6fff..f8642d6fc4 100644--- a/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php+++ b/app/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php@@ -183,7 +183,7 @@ class GithubPrivateRepositoryDeployKey extends Component$application_init['docker_compose_location'] = $this->docker_compose_location;$application_init['base_directory'] = $this->base_directory;}- $application = Application::forceCreate($application_init);+ $application = Application::create($application_init);$application->settings->is_static = $this->is_static;$application->settings->save();diff --git a/app/Livewire/Project/New/PublicGitRepository.php b/app/Livewire/Project/New/PublicGitRepository.phpindex 6bd71d2461..62ac7ec0d7 100644--- a/app/Livewire/Project/New/PublicGitRepository.php+++ b/app/Livewire/Project/New/PublicGitRepository.php@@ -299,7 +299,7 @@ class PublicGitRepository extends Component$new_service['source_id'] = $this->git_source->id;$new_service['source_type'] = $this->git_source->getMorphClass();}- $service = Service::forceCreate($new_service);+ $service = Service::create($new_service);return redirect()->route('project.service.configuration', ['service_uuid' => $service->uuid,@@ -346,7 +346,7 @@ class PublicGitRepository extends Component$application_init['docker_compose_location'] = $this->docker_compose_location;$application_init['base_directory'] = $this->base_directory;}- $application = Application::forceCreate($application_init);+ $application = Application::create($application_init);$application->settings->is_static = $this->isStatic;$application->settings->save();diff --git a/app/Livewire/Project/New/SimpleDockerfile.php b/app/Livewire/Project/New/SimpleDockerfile.phpindex 400b58fea4..1073157e63 100644--- a/app/Livewire/Project/New/SimpleDockerfile.php+++ b/app/Livewire/Project/New/SimpleDockerfile.php@@ -52,7 +52,7 @@ CMD ["nginx", "-g", "daemon off;"]if (! $port) {$port = 80;}- $application = Application::forceCreate([+ $application = Application::create(['name' => 'dockerfile-'.new Cuid2,'repository_project_id' => 0,'git_repository' => 'coollabsio/coolify',diff --git a/app/Livewire/Project/Resource/Create.php b/app/Livewire/Project/Resource/Create.phpindex dbe56b0794..966c66a14a 100644--- a/app/Livewire/Project/Resource/Create.php+++ b/app/Livewire/Project/Resource/Create.php@@ -91,7 +91,7 @@ class Create extends Componentif (in_array($oneClickServiceName, NEEDS_TO_CONNECT_TO_PREDEFINED_NETWORK)) {data_set($service_payload, 'connect_to_docker_network', true);}- $service = Service::forceCreate($service_payload);+ $service = Service::create($service_payload);$service->name = "$oneClickServiceName-".$service->uuid;$service->save();if ($oneClickDotEnvs?->count() > 0) {diff --git a/app/Livewire/Project/Shared/ResourceOperations.php b/app/Livewire/Project/Shared/ResourceOperations.phpindex 301c51be92..f4813dd4cb 100644--- a/app/Livewire/Project/Shared/ResourceOperations.php+++ b/app/Livewire/Project/Shared/ResourceOperations.php@@ -94,7 +94,7 @@ class ResourceOperations extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => $uuid,'name' => $this->resource->name.'-clone-'.$uuid,'status' => 'exited',@@ -143,7 +143,7 @@ class ResourceOperations extends Component'created_at','updated_at','uuid',- ])->forceFill([+ ])->fill(['name' => $newName,'resource_id' => $new_resource->id,]);@@ -172,7 +172,7 @@ class ResourceOperations extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['resource_id' => $new_resource->id,]);$newStorage->save();@@ -185,7 +185,7 @@ class ResourceOperations extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => $uuid,'database_id' => $new_resource->id,'database_type' => $new_resource->getMorphClass(),@@ -204,7 +204,7 @@ class ResourceOperations extends Component'id','created_at','updated_at',- ])->forceFill($payload);+ ])->fill($payload);$newEnvironmentVariable->save();}@@ -221,7 +221,7 @@ class ResourceOperations extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => $uuid,'name' => $this->resource->name.'-clone-'.$uuid,'destination_id' => $new_destination->id,@@ -242,7 +242,7 @@ class ResourceOperations extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => (string) new Cuid2,'service_id' => $new_resource->id,'team_id' => currentTeam()->id,@@ -256,7 +256,7 @@ class ResourceOperations extends Component'id','created_at','updated_at',- ])->forceFill([+ ])->fill(['resourceable_id' => $new_resource->id,'resourceable_type' => $new_resource->getMorphClass(),]);@@ -264,7 +264,7 @@ class ResourceOperations extends Component}foreach ($new_resource->applications() as $application) {- $application->forceFill([+ $application->fill(['status' => 'exited',])->save();@@ -282,7 +282,7 @@ class ResourceOperations extends Component'created_at','updated_at','uuid',- ])->forceFill([+ ])->fill(['name' => $newName,'resource_id' => $application->id,]);@@ -307,7 +307,7 @@ class ResourceOperations extends Component}foreach ($new_resource->databases() as $database) {- $database->forceFill([+ $database->fill(['status' => 'exited',])->save();@@ -325,7 +325,7 @@ class ResourceOperations extends Component'created_at','updated_at','uuid',- ])->forceFill([+ ])->fill(['name' => $newName,'resource_id' => $database->id,]);@@ -366,7 +366,7 @@ class ResourceOperations extends Componenttry {$this->authorize('update', $this->resource);$new_environment = Environment::ownedByCurrentTeam()->findOrFail($environment_id);- $this->resource->forceFill([+ $this->resource->fill(['environment_id' => $environment_id,])->save();if ($this->resource->type() === 'application') {diff --git a/app/Livewire/Project/Show.php b/app/Livewire/Project/Show.phpindex b9628dd0d7..e884abb4e4 100644--- a/app/Livewire/Project/Show.php+++ b/app/Livewire/Project/Show.php@@ -42,7 +42,7 @@ class Show extends Component{try {$this->validate();- $environment = Environment::forceCreate([+ $environment = Environment::create(['name' => $this->name,'project_id' => $this->project->id,'uuid' => (string) new Cuid2,diff --git a/app/Livewire/Server/Destinations.php b/app/Livewire/Server/Destinations.phpindex f41ca00f32..117b43ad64 100644--- a/app/Livewire/Server/Destinations.php+++ b/app/Livewire/Server/Destinations.php@@ -43,7 +43,7 @@ class Destinations extends Componentreturn;} else {- SwarmDocker::forceCreate([+ SwarmDocker::create(['name' => $this->server->name.'-'.$name,'network' => $this->name,'server_id' => $this->server->id,@@ -57,7 +57,7 @@ class Destinations extends Componentreturn;} else {- StandaloneDocker::forceCreate([+ StandaloneDocker::create(['name' => $this->server->name.'-'.$name,'network' => $name,'server_id' => $this->server->id,diff --git a/app/Models/Application.php b/app/Models/Application.phpindex bdc76eb33b..fef6f6e4c3 100644--- a/app/Models/Application.php+++ b/app/Models/Application.php@@ -203,6 +203,14 @@ class Application extends BaseModel'restart_count','last_restart_at','last_restart_type',+ 'uuid',+ 'environment_id',+ 'destination_id',+ 'destination_type',+ 'source_id',+ 'source_type',+ 'repository_project_id',+ 'private_key_id',];protected $appends = ['server_status'];@@ -262,7 +270,7 @@ class Application extends BaseModel}}if (count($payload) > 0) {- $application->forceFill($payload);+ $application->fill($payload);}// Buildpack switching cleanup logic@@ -299,7 +307,7 @@ class Application extends BaseModel}});static::created(function ($application) {- ApplicationSetting::forceCreate([+ ApplicationSetting::create(['application_id' => $application->id,]);$application->compose_parsing_version = self::$parserVersion;diff --git a/app/Models/ApplicationDeploymentQueue.php b/app/Models/ApplicationDeploymentQueue.phpindex 21cb58abe2..67f28523ce 100644--- a/app/Models/ApplicationDeploymentQueue.php+++ b/app/Models/ApplicationDeploymentQueue.php@@ -44,6 +44,7 @@ class ApplicationDeploymentQueue extends Model'application_id','deployment_uuid','pull_request_id',+ 'docker_registry_image_tag','force_rebuild','commit','status',diff --git a/app/Models/ApplicationPreview.php b/app/Models/ApplicationPreview.phpindex 818f96d8e4..f08a48cea6 100644--- a/app/Models/ApplicationPreview.php+++ b/app/Models/ApplicationPreview.php@@ -11,6 +11,7 @@ class ApplicationPreview extends BaseModeluse SoftDeletes;protected $fillable = [+ 'uuid','application_id','pull_request_id','pull_request_html_url',@@ -62,7 +63,7 @@ class ApplicationPreview extends BaseModel});static::saving(function ($preview) {if ($preview->isDirty('status')) {- $preview->forceFill(['last_online_at' => now()]);+ $preview->last_online_at = now();}});}diff --git a/app/Models/ApplicationSetting.php b/app/Models/ApplicationSetting.phpindex 24b35df7fa..731a9b5da0 100644--- a/app/Models/ApplicationSetting.php+++ b/app/Models/ApplicationSetting.php@@ -29,6 +29,7 @@ class ApplicationSetting extends Model];protected $fillable = [+ 'application_id','is_static','is_git_submodules_enabled','is_git_lfs_enabled',diff --git a/app/Models/CloudProviderToken.php b/app/Models/CloudProviderToken.phpindex 123376c9b9..026d11fba3 100644--- a/app/Models/CloudProviderToken.php+++ b/app/Models/CloudProviderToken.php@@ -5,6 +5,7 @@ namespace App\Models;class CloudProviderToken extends BaseModel{protected $fillable = [+ 'team_id','provider','token','name',diff --git a/app/Models/Environment.php b/app/Models/Environment.phpindex 55ce932659..65ffaf5797 100644--- a/app/Models/Environment.php+++ b/app/Models/Environment.php@@ -28,6 +28,8 @@ class Environment extends BaseModelprotected $fillable = ['name','description',+ 'project_id',+ 'uuid',];protected static function booted()diff --git a/app/Models/GithubApp.php b/app/Models/GithubApp.phpindex 3cffeb8f89..54bbb3f7d5 100644--- a/app/Models/GithubApp.php+++ b/app/Models/GithubApp.php@@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Casts\Attribute;class GithubApp extends BaseModel{protected $fillable = [+ 'team_id',+ 'private_key_id','name','organization','api_url',diff --git a/app/Models/Project.php b/app/Models/Project.phpindex ff2cae0410..15628892e0 100644--- a/app/Models/Project.php+++ b/app/Models/Project.php@@ -27,6 +27,8 @@ class Project extends BaseModelprotected $fillable = ['name','description',+ 'team_id',+ 'uuid',];/**@@ -51,10 +53,10 @@ class Project extends BaseModelprotected static function booted(){static::created(function ($project) {- ProjectSetting::forceCreate([+ ProjectSetting::create(['project_id' => $project->id,]);- Environment::forceCreate([+ Environment::create(['name' => 'production','project_id' => $project->id,'uuid' => (string) new Cuid2,diff --git a/app/Models/ProjectSetting.php b/app/Models/ProjectSetting.phpindex 7ea17ba7af..8b59ffac68 100644--- a/app/Models/ProjectSetting.php+++ b/app/Models/ProjectSetting.php@@ -6,7 +6,9 @@ use Illuminate\Database\Eloquent\Model;class ProjectSetting extends Model{- protected $fillable = [];+ protected $fillable = [+ 'project_id',+ ];public function project(){diff --git a/app/Models/ScheduledDatabaseBackup.php b/app/Models/ScheduledDatabaseBackup.phpindex c6aed863dc..6308bae8b7 100644--- a/app/Models/ScheduledDatabaseBackup.php+++ b/app/Models/ScheduledDatabaseBackup.php@@ -9,6 +9,8 @@ use Illuminate\Database\Eloquent\Relations\MorphTo;class ScheduledDatabaseBackup extends BaseModel{protected $fillable = [+ 'uuid',+ 'team_id','description','enabled','save_s3',diff --git a/app/Models/ScheduledDatabaseBackupExecution.php b/app/Models/ScheduledDatabaseBackupExecution.phpindex f1f6e88b52..51ad46de93 100644--- a/app/Models/ScheduledDatabaseBackupExecution.php+++ b/app/Models/ScheduledDatabaseBackupExecution.php@@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;class ScheduledDatabaseBackupExecution extends BaseModel{protected $fillable = [+ 'uuid',+ 'scheduled_database_backup_id','status','message','size',diff --git a/app/Models/ScheduledTask.php b/app/Models/ScheduledTask.phpindex e76f1b7b94..40f8e18609 100644--- a/app/Models/ScheduledTask.php+++ b/app/Models/ScheduledTask.php@@ -30,12 +30,16 @@ class ScheduledTask extends BaseModeluse HasSafeStringAttribute;protected $fillable = [+ 'uuid','enabled','name','command','frequency','container','timeout',+ 'team_id',+ 'application_id',+ 'service_id',];public static function ownedByCurrentTeamAPI(int $teamId)diff --git a/app/Models/ScheduledTaskExecution.php b/app/Models/ScheduledTaskExecution.phpindex dd74ba2e02..1e26c7be3f 100644--- a/app/Models/ScheduledTaskExecution.php+++ b/app/Models/ScheduledTaskExecution.php@@ -23,6 +23,7 @@ use OpenApi\Attributes as OA;class ScheduledTaskExecution extends BaseModel{protected $fillable = [+ 'scheduled_task_id','status','message','finished_at',diff --git a/app/Models/Server.php b/app/Models/Server.phpindex 427896a19d..a18fe14ae4 100644--- a/app/Models/Server.php+++ b/app/Models/Server.php@@ -135,7 +135,7 @@ class Server extends BaseModel$payload['ip_previous'] = $server->getOriginal('ip');}}- $server->forceFill($payload);+ $server->fill($payload);});static::saved(function ($server) {if ($server->wasChanged('private_key_id') || $server->privateKey?->isDirty()) {@@ -265,6 +265,7 @@ class Server extends BaseModel'detected_traefik_version','traefik_outdated_info','server_metadata',+ 'ip_previous',];use HasSafeStringAttribute;diff --git a/app/Models/ServerSetting.php b/app/Models/ServerSetting.phpindex d34f2c86bd..30fc1e1651 100644--- a/app/Models/ServerSetting.php+++ b/app/Models/ServerSetting.php@@ -54,6 +54,7 @@ use OpenApi\Attributes as OA;class ServerSetting extends Model{protected $fillable = [+ 'server_id','is_swarm_manager','is_jump_server','is_build_server',diff --git a/app/Models/Service.php b/app/Models/Service.phpindex 491924c497..11189b4ac6 100644--- a/app/Models/Service.php+++ b/app/Models/Service.php@@ -49,6 +49,7 @@ class Service extends BaseModelprivate static $parserVersion = '5';protected $fillable = [+ 'uuid','name','description','docker_compose_raw',@@ -58,6 +59,10 @@ class Service extends BaseModel'config_hash','compose_parsing_version','is_container_label_escape_enabled',+ 'environment_id',+ 'server_id',+ 'destination_id',+ 'destination_type',];protected $appends = ['server_status', 'status'];diff --git a/app/Models/ServiceApplication.php b/app/Models/ServiceApplication.phpindex e608c202d2..6bf12f4e7d 100644--- a/app/Models/ServiceApplication.php+++ b/app/Models/ServiceApplication.php@@ -12,6 +12,7 @@ class ServiceApplication extends BaseModeluse HasFactory, SoftDeletes;protected $fillable = [+ 'service_id','name','human_name','description',@@ -39,7 +40,7 @@ class ServiceApplication extends BaseModel});static::saving(function ($service) {if ($service->isDirty('status')) {- $service->forceFill(['last_online_at' => now()]);+ $service->last_online_at = now();}});}diff --git a/app/Models/ServiceDatabase.php b/app/Models/ServiceDatabase.phpindex e5b28d9298..69801f9857 100644--- a/app/Models/ServiceDatabase.php+++ b/app/Models/ServiceDatabase.php@@ -10,6 +10,7 @@ class ServiceDatabase extends BaseModeluse HasFactory, SoftDeletes;protected $fillable = [+ 'service_id','name','human_name','description',@@ -44,7 +45,7 @@ class ServiceDatabase extends BaseModel});static::saving(function ($service) {if ($service->isDirty('status')) {- $service->forceFill(['last_online_at' => now()]);+ $service->last_online_at = now();}});}diff --git a/app/Models/StandaloneClickhouse.php b/app/Models/StandaloneClickhouse.phpindex c6d91dd553..784e2c9379 100644--- a/app/Models/StandaloneClickhouse.php+++ b/app/Models/StandaloneClickhouse.php@@ -14,6 +14,7 @@ class StandaloneClickhouse extends BaseModeluse ClearsGlobalSearchCache, HasFactory, HasMetrics, HasSafeStringAttribute, SoftDeletes;protected $fillable = [+ 'uuid','name','description','clickhouse_admin_user',@@ -40,6 +41,9 @@ class StandaloneClickhouse extends BaseModel'public_port_timeout','custom_docker_run_options','clickhouse_db',+ 'destination_type',+ 'destination_id',+ 'environment_id',];protected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];@@ -71,7 +75,7 @@ class StandaloneClickhouse extends BaseModel});static::saving(function ($database) {if ($database->isDirty('status')) {- $database->forceFill(['last_online_at' => now()]);+ $database->last_online_at = now();}});}diff --git a/app/Models/StandaloneDocker.php b/app/Models/StandaloneDocker.phpindex 09dae022bd..dcb3494053 100644--- a/app/Models/StandaloneDocker.php+++ b/app/Models/StandaloneDocker.php@@ -13,6 +13,7 @@ class StandaloneDocker extends BaseModeluse HasSafeStringAttribute;protected $fillable = [+ 'server_id','name','network',];diff --git a/app/Models/StandaloneDragonfly.php b/app/Models/StandaloneDragonfly.phpindex af309f9806..e07053c034 100644--- a/app/Models/StandaloneDragonfly.php+++ b/app/Models/StandaloneDragonfly.php@@ -14,6 +14,7 @@ class StandaloneDragonfly extends BaseModeluse ClearsGlobalSearchCache, HasFactory, HasMetrics, HasSafeStringAttribute, SoftDeletes;protected $fillable = [+ 'uuid','name','description','dragonfly_password',@@ -39,6 +40,9 @@ class StandaloneDragonfly extends BaseModel'public_port_timeout','enable_ssl','custom_docker_run_options',+ 'destination_type',+ 'destination_id',+ 'environment_id',];protected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];@@ -70,7 +74,7 @@ class StandaloneDragonfly extends BaseModel});static::saving(function ($database) {if ($database->isDirty('status')) {- $database->forceFill(['last_online_at' => now()]);+ $database->last_online_at = now();}});}diff --git a/app/Models/StandaloneKeydb.php b/app/Models/StandaloneKeydb.phpindex ee07b4783b..979f45a3db 100644--- a/app/Models/StandaloneKeydb.php+++ b/app/Models/StandaloneKeydb.php@@ -14,6 +14,7 @@ class StandaloneKeydb extends BaseModeluse ClearsGlobalSearchCache, HasFactory, HasMetrics, HasSafeStringAttribute, SoftDeletes;protected $fillable = [+ 'uuid','name','description','keydb_password',@@ -40,6 +41,9 @@ class StandaloneKeydb extends BaseModel'public_port_timeout','enable_ssl','custom_docker_run_options',+ 'destination_type',+ 'destination_id',+ 'environment_id',];protected $appends = ['internal_db_url', 'external_db_url', 'server_status'];@@ -71,7 +75,7 @@ class StandaloneKeydb extends BaseModel});static::saving(function ($database) {if ($database->isDirty('status')) {- $database->forceFill(['last_online_at' => now()]);+ $database->last_online_at = now();}});}diff --git a/app/Models/StandaloneMariadb.php b/app/Models/StandaloneMariadb.phpindex ad5220496b..dba8a52f54 100644--- a/app/Models/StandaloneMariadb.php+++ b/app/Models/StandaloneMariadb.php@@ -15,6 +15,7 @@ class StandaloneMariadb extends BaseModeluse ClearsGlobalSearchCache, HasFactory, HasMetrics, HasSafeStringAttribute, SoftDeletes;protected $fillable = [+ 'uuid','name','description','mariadb_root_password',@@ -43,6 +44,9 @@ class StandaloneMariadb extends BaseModel'enable_ssl','is_log_drain_enabled','custom_docker_run_options',+ 'destination_type',+ 'destination_id',+ 'environment_id',];protected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];@@ -74,7 +78,7 @@ class StandaloneMariadb extends BaseModel});static::saving(function ($database) {if ($database->isDirty('status')) {- $database->forceFill(['last_online_at' => now()]);+ $database->last_online_at = now();}});}diff --git a/app/Models/StandaloneMongodb.php b/app/Models/StandaloneMongodb.phpindex 590c173e14..e72f4f1c61 100644--- a/app/Models/StandaloneMongodb.php+++ b/app/Models/StandaloneMongodb.php@@ -14,6 +14,7 @@ class StandaloneMongodb extends BaseModeluse ClearsGlobalSearchCache, HasFactory, HasMetrics, HasSafeStringAttribute, SoftDeletes;protected $fillable = [+ 'uuid','name','description','mongo_conf',@@ -43,6 +44,9 @@ class StandaloneMongodb extends BaseModel'is_log_drain_enabled','is_include_timestamps','custom_docker_run_options',+ 'destination_type',+ 'destination_id',+ 'environment_id',];protected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];@@ -80,7 +84,7 @@ class StandaloneMongodb extends BaseModel});static::saving(function ($database) {if ($database->isDirty('status')) {- $database->forceFill(['last_online_at' => now()]);+ $database->last_online_at = now();}});}diff --git a/app/Models/StandaloneMysql.php b/app/Models/StandaloneMysql.phpindex d991617b74..1c522d2005 100644--- a/app/Models/StandaloneMysql.php+++ b/app/Models/StandaloneMysql.php@@ -14,6 +14,7 @@ class StandaloneMysql extends BaseModeluse ClearsGlobalSearchCache, HasFactory, HasMetrics, HasSafeStringAttribute, SoftDeletes;protected $fillable = [+ 'uuid','name','description','mysql_root_password',@@ -44,6 +45,9 @@ class StandaloneMysql extends BaseModel'is_log_drain_enabled','is_include_timestamps','custom_docker_run_options',+ 'destination_type',+ 'destination_id',+ 'environment_id',];protected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];@@ -76,7 +80,7 @@ class StandaloneMysql extends BaseModel});static::saving(function ($database) {if ($database->isDirty('status')) {- $database->forceFill(['last_online_at' => now()]);+ $database->last_online_at = now();}});}diff --git a/app/Models/StandalonePostgresql.php b/app/Models/StandalonePostgresql.phpindex 71034427f5..57dfe59880 100644--- a/app/Models/StandalonePostgresql.php+++ b/app/Models/StandalonePostgresql.php@@ -14,6 +14,7 @@ class StandalonePostgresql extends BaseModeluse ClearsGlobalSearchCache, HasFactory, HasMetrics, HasSafeStringAttribute, SoftDeletes;protected $fillable = [+ 'uuid','name','description','postgres_user',@@ -46,6 +47,9 @@ class StandalonePostgresql extends BaseModel'is_log_drain_enabled','is_include_timestamps','custom_docker_run_options',+ 'destination_type',+ 'destination_id',+ 'environment_id',];protected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];@@ -92,7 +96,7 @@ class StandalonePostgresql extends BaseModel});static::saving(function ($database) {if ($database->isDirty('status')) {- $database->forceFill(['last_online_at' => now()]);+ $database->last_online_at = now();}});}diff --git a/app/Models/StandaloneRedis.php b/app/Models/StandaloneRedis.phpindex 4eb28e0385..ef42d7f180 100644--- a/app/Models/StandaloneRedis.php+++ b/app/Models/StandaloneRedis.php@@ -14,6 +14,7 @@ class StandaloneRedis extends BaseModeluse ClearsGlobalSearchCache, HasFactory, HasMetrics, HasSafeStringAttribute, SoftDeletes;protected $fillable = [+ 'uuid','name','description','redis_conf',@@ -39,6 +40,9 @@ class StandaloneRedis extends BaseModel'is_log_drain_enabled','is_include_timestamps','custom_docker_run_options',+ 'destination_type',+ 'destination_id',+ 'environment_id',];protected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];@@ -69,7 +73,7 @@ class StandaloneRedis extends BaseModel});static::saving(function ($database) {if ($database->isDirty('status')) {- $database->forceFill(['last_online_at' => now()]);+ $database->last_online_at = now();}});diff --git a/app/Models/Subscription.php b/app/Models/Subscription.phpindex fa135b29f3..b0fec64f9b 100644--- a/app/Models/Subscription.php+++ b/app/Models/Subscription.php@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;class Subscription extends Model{protected $fillable = [+ 'team_id','stripe_invoice_paid','stripe_subscription_id','stripe_customer_id',diff --git a/app/Models/SwarmDocker.php b/app/Models/SwarmDocker.phpindex 656749119d..134e361897 100644--- a/app/Models/SwarmDocker.php+++ b/app/Models/SwarmDocker.php@@ -7,6 +7,7 @@ use App\Support\ValidationPatterns;class SwarmDocker extends BaseModel{protected $fillable = [+ 'server_id','name','network',];diff --git a/app/Models/Tag.php b/app/Models/Tag.phpindex 9ee58cf7d5..e6fbd3a065 100644--- a/app/Models/Tag.php+++ b/app/Models/Tag.php@@ -10,6 +10,7 @@ class Tag extends BaseModelprotected $fillable = ['name',+ 'team_id',];protected function customizeName($value)diff --git a/app/Models/User.php b/app/Models/User.phpindex ad9a7af310..aa33a49fb7 100644--- a/app/Models/User.php+++ b/app/Models/User.php@@ -49,6 +49,9 @@ class User extends Authenticatable implements SendsEmail'password','force_password_reset','marketing_emails',+ 'pending_email',+ 'email_change_code',+ 'email_change_code_expires_at',];protected $hidden = [@@ -409,7 +412,7 @@ class User extends Authenticatable implements SendsEmail$expiryMinutes = config('constants.email_change.verification_code_expiry_minutes', 10);$expiresAt = Carbon::now()->addMinutes($expiryMinutes);- $this->forceFill([+ $this->fill(['pending_email' => $newEmail,'email_change_code' => $code,'email_change_code_expires_at' => $expiresAt,diff --git a/bootstrap/helpers/applications.php b/bootstrap/helpers/applications.phpindex e4feec692b..48e0a8c780 100644--- a/bootstrap/helpers/applications.php+++ b/bootstrap/helpers/applications.php@@ -214,7 +214,7 @@ function clone_application(Application $source, $destination, array $overrides ='updated_at','additional_servers_count','additional_networks_count',- ])->forceFill(array_merge([+ ])->fill(array_merge(['uuid' => $uuid,'name' => $name,'fqdn' => $url,@@ -237,7 +237,7 @@ function clone_application(Application $source, $destination, array $overrides ='id','created_at','updated_at',- ])->forceFill([+ ])->fill(['application_id' => $newApplication->id,]);$newApplicationSettings->save();@@ -257,7 +257,7 @@ function clone_application(Application $source, $destination, array $overrides ='id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => (string) new Cuid2,'application_id' => $newApplication->id,'team_id' => currentTeam()->id,@@ -272,7 +272,7 @@ function clone_application(Application $source, $destination, array $overrides ='id','created_at','updated_at',- ])->forceFill([+ ])->fill(['uuid' => (string) new Cuid2,'application_id' => $newApplication->id,'status' => 'exited',@@ -304,7 +304,7 @@ function clone_application(Application $source, $destination, array $overrides ='created_at','updated_at','uuid',- ])->forceFill([+ ])->fill(['name' => $newName,'resource_id' => $newApplication->id,]);@@ -340,7 +340,7 @@ function clone_application(Application $source, $destination, array $overrides ='id','created_at','updated_at',- ])->forceFill([+ ])->fill(['resource_id' => $newApplication->id,]);$newStorage->save();@@ -354,7 +354,7 @@ function clone_application(Application $source, $destination, array $overrides ='id','created_at','updated_at',- ])->forceFill([+ ])->fill(['resourceable_id' => $newApplication->id,'resourceable_type' => $newApplication->getMorphClass(),'is_preview' => false,@@ -371,7 +371,7 @@ function clone_application(Application $source, $destination, array $overrides ='id','created_at','updated_at',- ])->forceFill([+ ])->fill(['resourceable_id' => $newApplication->id,'resourceable_type' => $newApplication->getMorphClass(),'is_preview' => true,diff --git a/bootstrap/helpers/parsers.php b/bootstrap/helpers/parsers.phpindex 7518512830..123cf906a7 100644--- a/bootstrap/helpers/parsers.php+++ b/bootstrap/helpers/parsers.php@@ -1597,7 +1597,7 @@ function serviceParser(Service $resource): Collectionif ($databaseFound) {$savedService = $databaseFound;} else {- $savedService = ServiceDatabase::forceCreate([+ $savedService = ServiceDatabase::create(['name' => $serviceName,'service_id' => $resource->id,]);@@ -1607,7 +1607,7 @@ function serviceParser(Service $resource): Collectionif ($applicationFound) {$savedService = $applicationFound;} else {- $savedService = ServiceApplication::forceCreate([+ $savedService = ServiceApplication::create(['name' => $serviceName,'service_id' => $resource->id,]);diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.phpindex a43f2e3402..cd773f6a9f 100644--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@ -1919,7 +1919,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal// Create new serviceApplication or serviceDatabaseif ($isDatabase) {if ($isNew) {- $savedService = ServiceDatabase::forceCreate([+ $savedService = ServiceDatabase::create(['name' => $serviceName,'image' => $image,'service_id' => $resource->id,@@ -1930,7 +1930,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal'service_id' => $resource->id,])->first();if (is_null($savedService)) {- $savedService = ServiceDatabase::forceCreate([+ $savedService = ServiceDatabase::create(['name' => $serviceName,'image' => $image,'service_id' => $resource->id,@@ -1939,7 +1939,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal}} else {if ($isNew) {- $savedService = ServiceApplication::forceCreate([+ $savedService = ServiceApplication::create(['name' => $serviceName,'image' => $image,'service_id' => $resource->id,@@ -1950,7 +1950,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal'service_id' => $resource->id,])->first();if (is_null($savedService)) {- $savedService = ServiceApplication::forceCreate([+ $savedService = ServiceApplication::create(['name' => $serviceName,'image' => $image,'service_id' => $resource->id,diff --git a/tests/Feature/ApplicationHealthCheckApiTest.php b/tests/Feature/ApplicationHealthCheckApiTest.phpindex 7f1b985add..3e40780515 100644--- a/tests/Feature/ApplicationHealthCheckApiTest.php+++ b/tests/Feature/ApplicationHealthCheckApiTest.php@@ -31,7 +31,7 @@ beforeEach(function () {);});- $this->project = Project::forceCreate([+ $this->project = Project::create(['uuid' => (string) new Cuid2,'name' => 'test-project','team_id' => $this->team->id,diff --git a/tests/Feature/ApplicationRollbackTest.php b/tests/Feature/ApplicationRollbackTest.phpindex 61b3505ae0..432bdde1bc 100644--- a/tests/Feature/ApplicationRollbackTest.php+++ b/tests/Feature/ApplicationRollbackTest.php@@ -6,7 +6,7 @@ use App\Models\ApplicationSetting;describe('Application Rollback', function () {beforeEach(function () {$this->application = new Application;- $this->application->forceFill([+ $this->application->fill(['uuid' => 'test-app-uuid','git_commit_sha' => 'HEAD',]);diff --git a/tests/Feature/ClonePersistentVolumeUuidTest.php b/tests/Feature/ClonePersistentVolumeUuidTest.phpindex 3f99c55852..13f7a13962 100644--- a/tests/Feature/ClonePersistentVolumeUuidTest.php+++ b/tests/Feature/ClonePersistentVolumeUuidTest.php@@ -31,7 +31,7 @@ beforeEach(function () {'redirect' => 'both',]);- $this->application->settings->forceFill([+ $this->application->settings->fill(['is_container_label_readonly_enabled' => false,])->save();@@ -92,7 +92,7 @@ test('cloning application with multiple persistent volumes generates unique uuid});test('cloning application reassigns settings to the cloned application', function () {- $this->application->settings->forceFill([+ $this->application->settings->fill(['is_static' => true,'is_spa' => true,'is_build_server_enabled' => true,@@ -118,7 +118,7 @@ test('cloning application reassigns settings to the cloned application', functio});test('cloning application reassigns scheduled tasks and previews to the cloned application', function () {- $scheduledTask = ScheduledTask::forceCreate([+ $scheduledTask = ScheduledTask::create(['uuid' => 'scheduled-task-original','application_id' => $this->application->id,'team_id' => $this->team->id,@@ -129,7 +129,7 @@ test('cloning application reassigns scheduled tasks and previews to the cloned a'timeout' => 120,]);- $preview = ApplicationPreview::forceCreate([+ $preview = ApplicationPreview::create(['uuid' => 'preview-original','application_id' => $this->application->id,'pull_request_id' => 123,diff --git a/tests/Feature/ComposePreviewFqdnTest.php b/tests/Feature/ComposePreviewFqdnTest.phpindex 62fc0f2d85..a5b8b2c9fe 100644--- a/tests/Feature/ComposePreviewFqdnTest.php+++ b/tests/Feature/ComposePreviewFqdnTest.php@@ -14,7 +14,7 @@ it('populates fqdn from docker_compose_domains after generate_preview_fqdn_compo]),]);- $preview = ApplicationPreview::forceCreate([+ $preview = ApplicationPreview::create(['application_id' => $application->id,'pull_request_id' => 42,'pull_request_html_url' => 'https://github.com/example/repo/pull/42',@@ -39,7 +39,7 @@ it('populates fqdn with multiple domains from multiple services', function () {]),]);- $preview = ApplicationPreview::forceCreate([+ $preview = ApplicationPreview::create(['application_id' => $application->id,'pull_request_id' => 7,'pull_request_html_url' => 'https://github.com/example/repo/pull/7',@@ -65,7 +65,7 @@ it('sets fqdn to null when no domains are configured', function () {]),]);- $preview = ApplicationPreview::forceCreate([+ $preview = ApplicationPreview::create(['application_id' => $application->id,'pull_request_id' => 99,'pull_request_html_url' => 'https://github.com/example/repo/pull/99',diff --git a/tests/Feature/DatabaseEnvironmentVariableApiTest.php b/tests/Feature/DatabaseEnvironmentVariableApiTest.phpindex 78e80483b2..f3297cf17a 100644--- a/tests/Feature/DatabaseEnvironmentVariableApiTest.php+++ b/tests/Feature/DatabaseEnvironmentVariableApiTest.php@@ -33,7 +33,7 @@ beforeEach(function () {function createDatabase($context): StandalonePostgresql{- return StandalonePostgresql::forceCreate([+ return StandalonePostgresql::create(['name' => 'test-postgres','image' => 'postgres:15-alpine','postgres_user' => 'postgres',diff --git a/tests/Feature/DatabasePublicPortTimeoutApiTest.php b/tests/Feature/DatabasePublicPortTimeoutApiTest.phpindex 1ffc32a81f..6bbc6279f3 100644--- a/tests/Feature/DatabasePublicPortTimeoutApiTest.php+++ b/tests/Feature/DatabasePublicPortTimeoutApiTest.php@@ -33,7 +33,7 @@ beforeEach(function () {describe('PATCH /api/v1/databases', function () {test('updates public_port_timeout on a postgresql database', function () {- $database = StandalonePostgresql::forceCreate([+ $database = StandalonePostgresql::create(['name' => 'test-postgres','image' => 'postgres:15-alpine','postgres_user' => 'postgres',@@ -57,7 +57,7 @@ describe('PATCH /api/v1/databases', function () {});test('updates public_port_timeout on a redis database', function () {- $database = StandaloneRedis::forceCreate([+ $database = StandaloneRedis::create(['name' => 'test-redis','image' => 'redis:7','redis_password' => 'password',@@ -79,7 +79,7 @@ describe('PATCH /api/v1/databases', function () {});test('rejects invalid public_port_timeout value', function () {- $database = StandalonePostgresql::forceCreate([+ $database = StandalonePostgresql::create(['name' => 'test-postgres','image' => 'postgres:15-alpine','postgres_user' => 'postgres',@@ -101,7 +101,7 @@ describe('PATCH /api/v1/databases', function () {});test('accepts null public_port_timeout', function () {- $database = StandalonePostgresql::forceCreate([+ $database = StandalonePostgresql::create(['name' => 'test-postgres','image' => 'postgres:15-alpine','postgres_user' => 'postgres',diff --git a/tests/Feature/DatabaseSslStatusRefreshTest.php b/tests/Feature/DatabaseSslStatusRefreshTest.phpindex eab2b08db0..e62ef48ad7 100644--- a/tests/Feature/DatabaseSslStatusRefreshTest.php+++ b/tests/Feature/DatabaseSslStatusRefreshTest.php@@ -52,7 +52,7 @@ it('reloads the mysql database model when refreshing so ssl controls follow the$project = Project::factory()->create(['team_id' => $this->team->id]);$environment = Environment::factory()->create(['project_id' => $project->id]);- $database = StandaloneMysql::forceCreate([+ $database = StandaloneMysql::create(['name' => 'test-mysql','image' => 'mysql:8','mysql_root_password' => 'password',@@ -70,7 +70,7 @@ it('reloads the mysql database model when refreshing so ssl controls follow the$component = Livewire::test(MysqlGeneral::class, ['database' => $database])->assertDontSee('Database should be stopped to change this settings.');- $database->forceFill(['status' => 'running:healthy'])->save();+ $database->fill(['status' => 'running:healthy'])->save();$component->call('refresh')->assertSee('Database should be stopped to change this settings.');diff --git a/tests/Feature/GetLogsCommandInjectionTest.php b/tests/Feature/GetLogsCommandInjectionTest.phpindex 3e5a33b661..c0b17c3bd7 100644--- a/tests/Feature/GetLogsCommandInjectionTest.php+++ b/tests/Feature/GetLogsCommandInjectionTest.php@@ -69,7 +69,7 @@ describe('GetLogs locked properties', function () {describe('GetLogs Livewire action validation', function () {test('getLogs rejects invalid container name', function () {// Make server functional by setting settings directly- $this->server->settings->forceFill([+ $this->server->settings->fill(['is_reachable' => true,'is_usable' => true,'force_disabled' => false,@@ -100,7 +100,7 @@ describe('GetLogs Livewire action validation', function () {});test('downloadAllLogs returns empty for invalid container name', function () {- $this->server->settings->forceFill([+ $this->server->settings->fill(['is_reachable' => true,'is_usable' => true,'force_disabled' => false,diff --git a/tests/Feature/GithubPrivateRepositoryTest.php b/tests/Feature/GithubPrivateRepositoryTest.phpindex abc288519f..ba66a10bbf 100644--- a/tests/Feature/GithubPrivateRepositoryTest.php+++ b/tests/Feature/GithubPrivateRepositoryTest.php@@ -31,7 +31,7 @@ beforeEach(function () {'team_id' => $this->team->id,]);- $this->githubApp = GithubApp::forceCreate([+ $this->githubApp = GithubApp::create(['name' => 'Test GitHub App','api_url' => 'https://api.github.com','html_url' => 'https://github.com',diff --git a/tests/Feature/InternalModelCreationMassAssignmentTest.php b/tests/Feature/InternalModelCreationMassAssignmentTest.phpindex fc581bf5c6..5aad7f3e08 100644--- a/tests/Feature/InternalModelCreationMassAssignmentTest.php+++ b/tests/Feature/InternalModelCreationMassAssignmentTest.php@@ -24,7 +24,7 @@ it('creates application settings for internally created applications', function]);$destination = $server->standaloneDockers()->firstOrFail();- $application = Application::forceCreate([+ $application = Application::create(['name' => 'internal-app','git_repository' => 'https://github.com/coollabsio/coolify','git_branch' => 'main',@@ -57,7 +57,7 @@ it('creates services with protected relationship ids in trusted internal paths',]);$destination = $server->standaloneDockers()->firstOrFail();- $service = Service::forceCreate([+ $service = Service::create(['docker_compose_raw' => 'services: {}','environment_id' => $environment->id,'server_id' => $server->id,diff --git a/tests/Feature/ModelFillableCreationTest.php b/tests/Feature/ModelFillableCreationTest.phpnew file mode 100644index 0000000000..b72e7381ed--- /dev/null+++ b/tests/Feature/ModelFillableCreationTest.php@@ -0,0 +1,1114 @@+<?php++use App\Models\Application;+use App\Models\ApplicationPreview;+use App\Models\ApplicationSetting;+use App\Models\CloudProviderToken;+use App\Models\Environment;+use App\Models\GithubApp;+use App\Models\Project;+use App\Models\ProjectSetting;+use App\Models\ScheduledDatabaseBackup;+use App\Models\ScheduledDatabaseBackupExecution;+use App\Models\ScheduledTask;+use App\Models\ScheduledTaskExecution;+use App\Models\Server;+use App\Models\ServerSetting;+use App\Models\Service;+use App\Models\ServiceApplication;+use App\Models\ServiceDatabase;+use App\Models\StandaloneClickhouse;+use App\Models\StandaloneDocker;+use App\Models\StandaloneDragonfly;+use App\Models\StandaloneKeydb;+use App\Models\StandaloneMariadb;+use App\Models\StandaloneMongodb;+use App\Models\StandaloneMysql;+use App\Models\StandalonePostgresql;+use App\Models\StandaloneRedis;+use App\Models\Subscription;+use App\Models\SwarmDocker;+use App\Models\Tag;+use App\Models\Team;+use App\Models\User;+use Illuminate\Foundation\Testing\RefreshDatabase;++uses(RefreshDatabase::class);++beforeEach(function () {+ $this->team = Team::factory()->create();+ $this->server = Server::factory()->create(['team_id' => $this->team->id]);+ $this->destination = $this->server->standaloneDockers()->firstOrFail();+ $this->project = Project::factory()->create(['team_id' => $this->team->id]);+ $this->environment = Environment::factory()->create(['project_id' => $this->project->id]);+});++it('creates User with all fillable attributes', function () {+ $user = User::create([+ 'name' => 'Test User',+ 'email' => '[email protected]',+ 'password' => bcrypt('password123'),+ 'force_password_reset' => true,+ 'marketing_emails' => false,+ 'pending_email' => '[email protected]',+ 'email_change_code' => 'ABC123',+ 'email_change_code_expires_at' => now()->addHour(),+ ]);++ expect($user->exists)->toBeTrue();+ expect($user->name)->toBe('Test User');+ expect($user->email)->toBe('[email protected]');+ expect($user->force_password_reset)->toBeTrue();+ expect($user->marketing_emails)->toBeFalse();+ expect($user->pending_email)->toBe('[email protected]');+ expect($user->email_change_code)->toBe('ABC123');+ expect($user->email_change_code_expires_at)->not->toBeNull();+});++it('creates Server with all fillable attributes', function () {+ $cloudToken = CloudProviderToken::create([+ 'team_id' => $this->team->id,+ 'provider' => 'hetzner',+ 'token' => 'test-token',+ 'name' => 'test-cloud',+ ]);++ $server = Server::create([+ 'name' => 'fillable-test-server',+ 'ip' => '10.0.0.99',+ 'port' => 2222,+ 'user' => 'deployer',+ 'description' => 'A test server with all fillable attrs',+ 'private_key_id' => $this->server->private_key_id,+ 'cloud_provider_token_id' => $cloudToken->id,+ 'team_id' => $this->team->id,+ 'hetzner_server_id' => 'htz-12345',+ 'hetzner_server_status' => 'running',+ 'is_validating' => false,+ 'detected_traefik_version' => 'v2.10.0',+ 'traefik_outdated_info' => 'Up to date',+ 'server_metadata' => '{"region":"eu-central"}',+ 'ip_previous' => '10.0.0.1',+ ]);++ expect($server->exists)->toBeTrue();+ expect((string) $server->name)->toBe('fillable-test-server');+ expect((string) $server->ip)->toBe('10.0.0.99');+ expect($server->port)->toBe(2222);+ expect((string) $server->user)->toBe('deployer');+ expect((string) $server->description)->toBe('A test server with all fillable attrs');+ expect($server->private_key_id)->toBe($this->server->private_key_id);+ expect($server->cloud_provider_token_id)->toBe($cloudToken->id);+ expect($server->hetzner_server_id)->toBe('htz-12345');+ expect($server->hetzner_server_status)->toBe('running');+ expect($server->ip_previous)->toBe('10.0.0.1');+});++it('creates Project with all fillable attributes', function () {+ $project = Project::create([+ 'name' => 'Fillable Test Project',+ 'description' => 'Testing all fillable attrs',+ 'team_id' => $this->team->id,+ 'uuid' => 'custom-project-uuid',+ ]);++ expect($project->exists)->toBeTrue();+ expect($project->name)->toBe('Fillable Test Project');+ expect($project->description)->toBe('Testing all fillable attrs');+ expect($project->team_id)->toBe($this->team->id);+ expect($project->uuid)->toBe('custom-project-uuid');+});++it('creates Environment with all fillable attributes', function () {+ $env = Environment::create([+ 'name' => 'staging',+ 'description' => 'Staging environment',+ 'project_id' => $this->project->id,+ 'uuid' => 'custom-env-uuid',+ ]);++ expect($env->exists)->toBeTrue();+ expect($env->name)->toBe('staging');+ expect($env->description)->toBe('Staging environment');+ expect($env->project_id)->toBe($this->project->id);+ expect($env->uuid)->toBe('custom-env-uuid');+});++it('creates ProjectSetting with all fillable attributes', function () {+ $setting = ProjectSetting::create([+ 'project_id' => $this->project->id,+ ]);++ expect($setting->exists)->toBeTrue();+ expect($setting->project_id)->toBe($this->project->id);+});++it('creates Application with all fillable attributes', function () {+ $application = Application::create([+ 'uuid' => 'custom-app-uuid',+ 'name' => 'Full Fillable App',+ 'description' => 'App with every fillable attr set',+ 'fqdn' => 'https://app.example.com',+ 'git_repository' => 'https://github.com/coollabsio/coolify',+ 'git_branch' => 'main',+ 'git_commit_sha' => 'abc123def456',+ 'git_full_url' => 'https://github.com/coollabsio/coolify.git',+ 'docker_registry_image_name' => 'ghcr.io/coollabsio/coolify',+ 'docker_registry_image_tag' => 'latest',+ 'build_pack' => 'nixpacks',+ 'static_image' => 'nginx:alpine',+ 'install_command' => 'npm install',+ 'build_command' => 'npm run build',+ 'start_command' => 'npm start',+ 'ports_exposes' => '3000',+ 'ports_mappings' => '3000:3000',+ 'base_directory' => '/',+ 'publish_directory' => '/dist',+ 'health_check_enabled' => true,+ 'health_check_path' => '/health',+ 'health_check_port' => '3000',+ 'health_check_host' => 'localhost',+ 'health_check_method' => 'GET',+ 'health_check_return_code' => 200,+ 'health_check_scheme' => 'http',+ 'health_check_response_text' => 'ok',+ 'health_check_interval' => 30,+ 'health_check_timeout' => 5,+ 'health_check_retries' => 3,+ 'health_check_start_period' => 10,+ 'health_check_type' => 'http',+ 'health_check_command' => 'curl -f http://localhost:3000/health',+ 'limits_memory' => '512m',+ 'limits_memory_swap' => '1g',+ 'limits_memory_swappiness' => 60,+ 'limits_memory_reservation' => '256m',+ 'limits_cpus' => '2',+ 'limits_cpuset' => '0-1',+ 'limits_cpu_shares' => 1024,+ 'status' => 'running',+ 'preview_url_template' => '{{pr_id}}.{{domain}}',+ 'dockerfile' => 'FROM node:18\nRUN npm install',+ 'dockerfile_location' => '/Dockerfile',+ 'dockerfile_target_build' => 'production',+ 'custom_labels' => 'traefik.enable=true',+ 'custom_docker_run_options' => '--cap-add=NET_ADMIN',+ 'post_deployment_command' => 'php artisan migrate',+ 'post_deployment_command_container' => 'app',+ 'pre_deployment_command' => 'php artisan down',+ 'pre_deployment_command_container' => 'app',+ 'manual_webhook_secret_github' => 'gh-secret-123',+ 'manual_webhook_secret_gitlab' => 'gl-secret-456',+ 'manual_webhook_secret_bitbucket' => 'bb-secret-789',+ 'manual_webhook_secret_gitea' => 'gt-secret-012',+ 'docker_compose_location' => '/docker-compose.yml',+ 'docker_compose' => 'services: {}',+ 'docker_compose_raw' => 'services:\n app:\n image: nginx',+ 'docker_compose_domains' => '{"app":"https://app.example.com"}',+ 'docker_compose_custom_start_command' => 'docker compose up -d',+ 'docker_compose_custom_build_command' => 'docker compose build',+ 'swarm_replicas' => 3,+ 'swarm_placement_constraints' => 'node.role==worker',+ 'watch_paths' => 'src/**,package.json',+ 'redirect' => 'www',+ 'compose_parsing_version' => '2',+ 'custom_nginx_configuration' => 'location / { proxy_pass http://localhost:3000; }',+ 'custom_network_aliases' => 'app-alias',+ 'custom_healthcheck_found' => false,+ // Note: nixpkgsarchive, connect_to_docker_network, force_domain_override,+ // is_container_label_escape_enabled, use_build_server are in $fillable but+ // their migration columns may not exist in the test SQLite schema yet.+ 'is_http_basic_auth_enabled' => false,+ 'http_basic_auth_username' => 'admin',+ 'http_basic_auth_password' => 'secret',+ 'config_hash' => 'sha256:abc123',+ 'last_online_at' => now()->subMinutes(5)->toISOString(),+ 'restart_count' => 2,+ 'last_restart_at' => now()->subHour()->toISOString(),+ 'last_restart_type' => 'manual',+ 'environment_id' => $this->environment->id,+ 'destination_id' => $this->destination->id,+ 'destination_type' => $this->destination->getMorphClass(),+ 'source_id' => null,+ 'source_type' => null,+ 'repository_project_id' => null,+ 'private_key_id' => null,+ ]);++ expect($application->exists)->toBeTrue();+ expect($application->uuid)->toBe('custom-app-uuid');+ expect($application->name)->toBe('Full Fillable App');+ expect((string) $application->git_repository)->toBe('https://github.com/coollabsio/coolify');+ expect($application->build_pack)->toBe('nixpacks');+ expect($application->ports_exposes)->toBe('3000');+ expect($application->environment_id)->toBe($this->environment->id);+ expect($application->destination_id)->toBe($this->destination->id);+ expect($application->health_check_enabled)->toBeTrue();+ expect($application->limits_memory)->toBe('512m');+ expect($application->swarm_replicas)->toBe(3);+ expect($application->restart_count)->toBe(2);+});++it('creates ApplicationSetting with all fillable attributes', function () {+ $app = Application::create([+ 'name' => 'settings-test-app',+ 'git_repository' => 'https://github.com/test/repo',+ 'git_branch' => 'main',+ 'build_pack' => 'nixpacks',+ 'ports_exposes' => '3000',+ 'environment_id' => $this->environment->id,+ 'destination_id' => $this->destination->id,+ 'destination_type' => $this->destination->getMorphClass(),+ ]);++ // Delete auto-created setting so we can create one with all attrs+ ApplicationSetting::where('application_id', $app->id)->delete();++ $setting = ApplicationSetting::create([+ 'application_id' => $app->id,+ 'is_static' => true,+ 'is_git_submodules_enabled' => true,+ 'is_git_lfs_enabled' => true,+ 'is_auto_deploy_enabled' => false,+ 'is_force_https_enabled' => true,+ 'is_debug_enabled' => true,+ 'is_preview_deployments_enabled' => false,+ 'is_log_drain_enabled' => true,+ 'is_gpu_enabled' => true,+ 'gpu_driver' => 'nvidia',+ 'gpu_count' => '2',+ 'gpu_device_ids' => 'GPU-abc,GPU-def',+ 'gpu_options' => '--gpus all',+ 'is_include_timestamps' => true,+ 'is_swarm_only_worker_nodes' => false,+ 'is_raw_compose_deployment_enabled' => false,+ 'is_build_server_enabled' => false,+ 'is_consistent_container_name_enabled' => true,+ 'is_gzip_enabled' => true,+ 'is_stripprefix_enabled' => true,+ 'connect_to_docker_network' => false,+ 'custom_internal_name' => 'my-custom-app',+ 'is_container_label_escape_enabled' => true,+ 'is_env_sorting_enabled' => true,+ 'is_container_label_readonly_enabled' => false,+ 'is_preserve_repository_enabled' => false,+ 'disable_build_cache' => false,+ 'is_spa' => true,+ 'is_git_shallow_clone_enabled' => true,+ 'is_pr_deployments_public_enabled' => false,+ 'use_build_secrets' => false,+ 'inject_build_args_to_dockerfile' => true,+ 'include_source_commit_in_build' => true,+ 'docker_images_to_keep' => 5,+ ]);++ expect($setting->exists)->toBeTrue();+ expect($setting->application_id)->toBe($app->id);+ expect($setting->is_static)->toBeTrue();+ expect($setting->is_gpu_enabled)->toBeTrue();+ expect($setting->gpu_driver)->toBe('nvidia');+ expect($setting->custom_internal_name)->toBe('my-custom-app');+ expect($setting->is_spa)->toBeTrue();+ expect($setting->docker_images_to_keep)->toBe(5);+});++it('creates ServerSetting with all fillable attributes', function () {+ // Delete auto-created setting+ ServerSetting::where('server_id', $this->server->id)->delete();++ $setting = ServerSetting::create([+ 'server_id' => $this->server->id,+ 'is_swarm_manager' => false,+ 'is_jump_server' => false,+ 'is_build_server' => true,+ 'is_reachable' => true,+ 'is_usable' => true,+ 'wildcard_domain' => '*.example.com',+ 'is_cloudflare_tunnel' => false,+ 'is_logdrain_newrelic_enabled' => true,+ 'logdrain_newrelic_license_key' => 'nr-license-key-123',+ 'logdrain_newrelic_base_uri' => 'https://log-api.newrelic.com',+ 'is_logdrain_highlight_enabled' => false,+ 'logdrain_highlight_project_id' => 'hl-proj-123',+ 'is_logdrain_axiom_enabled' => true,+ 'logdrain_axiom_dataset_name' => 'coolify-logs',+ 'logdrain_axiom_api_key' => 'axiom-key-456',+ 'is_swarm_worker' => false,+ 'is_logdrain_custom_enabled' => false,+ 'logdrain_custom_config' => '{"endpoint":"https://logs.example.com"}',+ 'logdrain_custom_config_parser' => 'json',+ 'concurrent_builds' => 4,+ 'dynamic_timeout' => 600,+ 'force_disabled' => false,+ 'is_metrics_enabled' => true,+ 'generate_exact_labels' => true,+ 'force_docker_cleanup' => false,+ 'docker_cleanup_frequency' => '0 2 * * *',+ 'docker_cleanup_threshold' => 80,+ 'server_timezone' => 'UTC',+ 'delete_unused_volumes' => true,+ 'delete_unused_networks' => true,+ 'is_sentinel_enabled' => true,+ 'sentinel_token' => 'sentinel-token-789',+ 'sentinel_metrics_refresh_rate_seconds' => 30,+ 'sentinel_metrics_history_days' => 7,+ 'sentinel_push_interval_seconds' => 60,+ 'sentinel_custom_url' => 'https://sentinel.example.com',+ 'server_disk_usage_notification_threshold' => 90,+ 'is_sentinel_debug_enabled' => false,+ 'server_disk_usage_check_frequency' => '*/5 * * * *',+ 'is_terminal_enabled' => true,+ 'deployment_queue_limit' => 10,+ 'disable_application_image_retention' => false,+ ]);++ expect($setting->exists)->toBeTrue();+ expect($setting->server_id)->toBe($this->server->id);+ expect($setting->is_build_server)->toBeTrue();+ expect($setting->wildcard_domain)->toBe('*.example.com');+ expect($setting->concurrent_builds)->toBe(4);+ expect($setting->sentinel_token)->toBe('sentinel-token-789');+ expect($setting->deployment_queue_limit)->toBe(10);+});++it('creates Service with all fillable attributes', function () {+ $service = Service::create([+ 'uuid' => 'custom-service-uuid',+ 'name' => 'Full Fillable Service',+ 'description' => 'Service with all fillable attrs',+ 'docker_compose_raw' => "services:\n app:\n image: nginx",+ 'docker_compose' => "services:\n app:\n image: nginx",+ 'connect_to_docker_network' => true,+ 'service_type' => 'test-service',+ 'config_hash' => 'sha256:svc123',+ 'compose_parsing_version' => '2',+ 'is_container_label_escape_enabled' => true,+ 'environment_id' => $this->environment->id,+ 'server_id' => $this->server->id,+ 'destination_id' => $this->destination->id,+ 'destination_type' => $this->destination->getMorphClass(),+ ]);++ expect($service->exists)->toBeTrue();+ expect($service->uuid)->toBe('custom-service-uuid');+ expect($service->name)->toBe('Full Fillable Service');+ expect($service->docker_compose_raw)->not->toBeNull();+ expect($service->service_type)->toBe('test-service');+ expect($service->environment_id)->toBe($this->environment->id);+ expect($service->server_id)->toBe($this->server->id);+});++it('creates ApplicationPreview with all fillable attributes', function () {+ $app = Application::create([+ 'name' => 'preview-test-app',+ 'git_repository' => 'https://github.com/test/repo',+ 'git_branch' => 'main',+ 'build_pack' => 'nixpacks',+ 'ports_exposes' => '3000',+ 'environment_id' => $this->environment->id,+ 'destination_id' => $this->destination->id,+ 'destination_type' => $this->destination->getMorphClass(),+ ]);++ $preview = ApplicationPreview::create([+ 'uuid' => 'custom-preview-uuid',+ 'application_id' => $app->id,+ 'pull_request_id' => 42,+ 'pull_request_html_url' => 'https://github.com/test/repo/pull/42',+ 'pull_request_issue_comment_id' => 12345,+ 'fqdn' => 'https://pr-42.app.example.com',+ 'status' => 'queued',+ 'git_type' => 'github',+ 'docker_compose_domains' => '{"app":"https://pr-42.example.com"}',+ 'docker_registry_image_tag' => 'pr-42',+ 'last_online_at' => now()->toISOString(),+ ]);++ expect($preview->exists)->toBeTrue();+ expect($preview->uuid)->toBe('custom-preview-uuid');+ expect($preview->application_id)->toBe($app->id);+ expect($preview->pull_request_id)->toBe(42);+ expect($preview->fqdn)->toBe('https://pr-42.app.example.com');+ expect($preview->git_type)->toBe('github');+ expect($preview->docker_registry_image_tag)->toBe('pr-42');+});++it('creates ServiceApplication with all fillable attributes', function () {+ $service = Service::create([+ 'docker_compose_raw' => 'services: {}',+ 'environment_id' => $this->environment->id,+ 'server_id' => $this->server->id,+ 'destination_id' => $this->destination->id,+ 'destination_type' => $this->destination->getMorphClass(),+ ]);++ $svcApp = ServiceApplication::create([+ 'service_id' => $service->id,+ 'name' => 'web',+ 'human_name' => 'Web Server',+ 'description' => 'Main web application',+ 'fqdn' => 'https://web.example.com',+ 'ports' => '80,443',+ 'exposes' => '80',+ 'status' => 'running',+ 'exclude_from_status' => false,+ 'required_fqdn' => true,+ 'image' => 'nginx:latest',+ 'is_log_drain_enabled' => true,+ 'is_include_timestamps' => true,+ 'is_gzip_enabled' => true,+ 'is_stripprefix_enabled' => true,+ 'last_online_at' => now()->toISOString(),+ 'is_migrated' => false,+ ]);++ expect($svcApp->exists)->toBeTrue();+ expect($svcApp->service_id)->toBe($service->id);+ expect($svcApp->name)->toBe('web');+ expect($svcApp->human_name)->toBe('Web Server');+ expect($svcApp->image)->toBe('nginx:latest');+ expect($svcApp->is_log_drain_enabled)->toBeTrue();+});++it('creates ServiceDatabase with all fillable attributes', function () {+ $service = Service::create([+ 'docker_compose_raw' => 'services: {}',+ 'environment_id' => $this->environment->id,+ 'server_id' => $this->server->id,+ 'destination_id' => $this->destination->id,+ 'destination_type' => $this->destination->getMorphClass(),+ ]);++ $svcDb = ServiceDatabase::create([+ 'service_id' => $service->id,+ 'name' => 'postgres',+ 'human_name' => 'PostgreSQL',+ 'description' => 'Main database',+ 'ports' => '5432',+ 'exposes' => '5432',+ 'status' => 'running',+ 'exclude_from_status' => false,+ 'image' => 'postgres:16',+ 'public_port' => 15432,+ 'is_public' => true,+ 'is_log_drain_enabled' => true,+ 'is_include_timestamps' => true,+ 'is_gzip_enabled' => false,+ 'is_stripprefix_enabled' => false,+ 'last_online_at' => now()->toISOString(),+ 'is_migrated' => false,+ 'custom_type' => 'postgresql',+ 'public_port_timeout' => 3600,+ ]);++ expect($svcDb->exists)->toBeTrue();+ expect($svcDb->service_id)->toBe($service->id);+ expect($svcDb->name)->toBe('postgres');+ expect($svcDb->public_port)->toBe(15432);+ expect($svcDb->is_public)->toBeTrue();+ expect($svcDb->custom_type)->toBe('postgresql');+});++it('creates StandalonePostgresql with all fillable attributes', function () {+ $db = StandalonePostgresql::create([+ 'uuid' => 'custom-pg-uuid',+ 'name' => 'Full Fillable Postgres',+ 'description' => 'PG with all attrs',+ 'postgres_user' => 'testuser',+ 'postgres_password' => 'testpass123',+ 'postgres_db' => 'testdb',+ 'postgres_initdb_args' => '--encoding=UTF8',+ 'postgres_host_auth_method' => 'scram-sha-256',+ 'postgres_conf' => 'max_connections=200',+ 'init_scripts' => 'CREATE TABLE test (id int);',+ 'status' => 'running',+ 'image' => 'postgres:16-alpine',+ 'is_public' => true,+ 'public_port' => 25432,+ 'ports_mappings' => '25432:5432',+ 'limits_memory' => '1g',+ 'limits_memory_swap' => '2g',+ 'limits_memory_swappiness' => 50,+ 'limits_memory_reservation' => '512m',+ 'limits_cpus' => '2',+ 'limits_cpuset' => '0-1',+ 'limits_cpu_shares' => 1024,+ 'started_at' => now()->subDay()->toISOString(),+ 'restart_count' => 1,+ 'last_restart_at' => now()->subHours(6)->toISOString(),+ 'last_restart_type' => 'manual',+ 'last_online_at' => now()->toISOString(),+ 'public_port_timeout' => 7200,+ 'enable_ssl' => true,+ 'ssl_mode' => 'verify-full',+ 'is_log_drain_enabled' => true,+ 'is_include_timestamps' => true,+ 'custom_docker_run_options' => '--shm-size=256m',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);++ expect($db->exists)->toBeTrue();+ expect($db->uuid)->toBe('custom-pg-uuid');+ expect($db->postgres_user)->toBe('testuser');+ expect($db->postgres_db)->toBe('testdb');+ expect($db->is_public)->toBeTrue();+ expect($db->public_port)->toBe(25432);+ expect($db->enable_ssl)->toBeTrue();+ expect($db->environment_id)->toBe($this->environment->id);+});++it('creates StandaloneMysql with all fillable attributes', function () {+ $db = StandaloneMysql::create([+ 'uuid' => 'custom-mysql-uuid',+ 'name' => 'Full Fillable MySQL',+ 'description' => 'MySQL with all attrs',+ 'mysql_root_password' => 'rootpass123',+ 'mysql_user' => 'testuser',+ 'mysql_password' => 'testpass123',+ 'mysql_database' => 'testdb',+ 'mysql_conf' => '[mysqld]\nmax_connections=200',+ 'status' => 'running',+ 'image' => 'mysql:8.0',+ 'is_public' => false,+ 'public_port' => 23306,+ 'ports_mappings' => '23306:3306',+ 'limits_memory' => '1g',+ 'limits_memory_swap' => '2g',+ 'limits_memory_swappiness' => 50,+ 'limits_memory_reservation' => '512m',+ 'limits_cpus' => '2',+ 'limits_cpuset' => '0-1',+ 'limits_cpu_shares' => 1024,+ 'started_at' => now()->subDay()->toISOString(),+ 'restart_count' => 0,+ 'last_restart_at' => null,+ 'last_restart_type' => null,+ 'last_online_at' => now()->toISOString(),+ 'public_port_timeout' => 3600,+ 'enable_ssl' => true,+ 'ssl_mode' => 'REQUIRED',+ 'is_log_drain_enabled' => false,+ 'is_include_timestamps' => false,+ 'custom_docker_run_options' => '--ulimit nofile=65535:65535',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);++ expect($db->exists)->toBeTrue();+ expect($db->uuid)->toBe('custom-mysql-uuid');+ expect($db->mysql_root_password)->toBe('rootpass123');+ expect($db->mysql_database)->toBe('testdb');+ expect($db->enable_ssl)->toBeTrue();+ expect($db->environment_id)->toBe($this->environment->id);+});++it('creates StandaloneMariadb with all fillable attributes', function () {+ $db = StandaloneMariadb::create([+ 'uuid' => 'custom-maria-uuid',+ 'name' => 'Full Fillable MariaDB',+ 'description' => 'MariaDB with all attrs',+ 'mariadb_root_password' => 'rootpass123',+ 'mariadb_user' => 'testuser',+ 'mariadb_password' => 'testpass123',+ 'mariadb_database' => 'testdb',+ 'mariadb_conf' => '[mysqld]\nmax_connections=200',+ 'status' => 'running',+ 'image' => 'mariadb:11',+ 'is_public' => false,+ 'public_port' => 23307,+ 'ports_mappings' => '23307:3306',+ 'limits_memory' => '1g',+ 'limits_memory_swap' => '2g',+ 'limits_memory_swappiness' => 50,+ 'limits_memory_reservation' => '512m',+ 'limits_cpus' => '2',+ 'limits_cpuset' => '0-1',+ 'limits_cpu_shares' => 1024,+ 'started_at' => now()->subDay()->toISOString(),+ 'restart_count' => 0,+ 'last_restart_at' => null,+ 'last_restart_type' => null,+ 'last_online_at' => now()->toISOString(),+ 'public_port_timeout' => 3600,+ 'enable_ssl' => false,+ 'is_log_drain_enabled' => false,+ 'custom_docker_run_options' => '',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);++ expect($db->exists)->toBeTrue();+ expect($db->uuid)->toBe('custom-maria-uuid');+ expect($db->mariadb_root_password)->toBe('rootpass123');+ expect($db->mariadb_database)->toBe('testdb');+ expect($db->environment_id)->toBe($this->environment->id);+});++it('creates StandaloneMongodb with all fillable attributes', function () {+ $db = StandaloneMongodb::create([+ 'uuid' => 'custom-mongo-uuid',+ 'name' => 'Full Fillable MongoDB',+ 'description' => 'MongoDB with all attrs',+ 'mongo_conf' => '{"storage":{"dbPath":"/data/db"}}',+ 'mongo_initdb_root_username' => 'mongoadmin',+ 'mongo_initdb_root_password' => 'mongopass123',+ 'mongo_initdb_database' => 'testdb',+ 'status' => 'running',+ 'image' => 'mongo:7',+ 'is_public' => false,+ 'public_port' => 27018,+ 'ports_mappings' => '27018:27017',+ 'limits_memory' => '2g',+ 'limits_memory_swap' => '4g',+ 'limits_memory_swappiness' => 60,+ 'limits_memory_reservation' => '1g',+ 'limits_cpus' => '4',+ 'limits_cpuset' => '0-3',+ 'limits_cpu_shares' => 2048,+ 'started_at' => now()->subDay()->toISOString(),+ 'restart_count' => 0,+ 'last_restart_at' => null,+ 'last_restart_type' => null,+ 'last_online_at' => now()->toISOString(),+ 'public_port_timeout' => 3600,+ 'enable_ssl' => false,+ 'ssl_mode' => 'prefer',+ 'is_log_drain_enabled' => false,+ 'is_include_timestamps' => false,+ 'custom_docker_run_options' => '',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);++ expect($db->exists)->toBeTrue();+ expect($db->uuid)->toBe('custom-mongo-uuid');+ expect($db->mongo_initdb_root_username)->toBe('mongoadmin');+ expect($db->mongo_initdb_database)->toBe('testdb');+ expect($db->environment_id)->toBe($this->environment->id);+});++it('creates StandaloneRedis with all fillable attributes', function () {+ $db = StandaloneRedis::create([+ 'uuid' => 'custom-redis-uuid',+ 'name' => 'Full Fillable Redis',+ 'description' => 'Redis with all attrs',+ 'redis_conf' => 'maxmemory 256mb\nmaxmemory-policy allkeys-lru',+ 'status' => 'running',+ 'image' => 'redis:7-alpine',+ 'is_public' => true,+ 'public_port' => 26379,+ 'ports_mappings' => '26379:6379',+ 'limits_memory' => '512m',+ 'limits_memory_swap' => '1g',+ 'limits_memory_swappiness' => 30,+ 'limits_memory_reservation' => '256m',+ 'limits_cpus' => '1',+ 'limits_cpuset' => '0',+ 'limits_cpu_shares' => 512,+ 'started_at' => now()->subDay()->toISOString(),+ 'restart_count' => 0,+ 'last_restart_at' => null,+ 'last_restart_type' => null,+ 'last_online_at' => now()->toISOString(),+ 'public_port_timeout' => 3600,+ 'enable_ssl' => false,+ 'is_log_drain_enabled' => false,+ 'is_include_timestamps' => false,+ 'custom_docker_run_options' => '',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);++ expect($db->exists)->toBeTrue();+ expect($db->uuid)->toBe('custom-redis-uuid');+ expect($db->redis_conf)->toContain('maxmemory');+ expect($db->is_public)->toBeTrue();+ expect($db->environment_id)->toBe($this->environment->id);+});++it('creates StandaloneKeydb with all fillable attributes', function () {+ $db = StandaloneKeydb::create([+ 'uuid' => 'custom-keydb-uuid',+ 'name' => 'Full Fillable KeyDB',+ 'description' => 'KeyDB with all attrs',+ 'keydb_password' => 'keydbpass123',+ 'keydb_conf' => 'server-threads 4',+ 'is_log_drain_enabled' => false,+ 'is_include_timestamps' => false,+ 'status' => 'running',+ 'image' => 'eqalpha/keydb:latest',+ 'is_public' => false,+ 'public_port' => 26380,+ 'ports_mappings' => '26380:6379',+ 'limits_memory' => '512m',+ 'limits_memory_swap' => '1g',+ 'limits_memory_swappiness' => 30,+ 'limits_memory_reservation' => '256m',+ 'limits_cpus' => '2',+ 'limits_cpuset' => '0-1',+ 'limits_cpu_shares' => 512,+ 'started_at' => now()->subDay()->toISOString(),+ 'restart_count' => 0,+ 'last_restart_at' => null,+ 'last_restart_type' => null,+ 'last_online_at' => now()->toISOString(),+ 'public_port_timeout' => 3600,+ 'enable_ssl' => false,+ 'custom_docker_run_options' => '',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);++ expect($db->exists)->toBeTrue();+ expect($db->uuid)->toBe('custom-keydb-uuid');+ expect($db->keydb_password)->toBe('keydbpass123');+ expect($db->environment_id)->toBe($this->environment->id);+});++it('creates StandaloneDragonfly with all fillable attributes', function () {+ $db = StandaloneDragonfly::create([+ 'uuid' => 'custom-dragonfly-uuid',+ 'name' => 'Full Fillable Dragonfly',+ 'description' => 'Dragonfly with all attrs',+ 'dragonfly_password' => 'dragonflypass123',+ 'is_log_drain_enabled' => false,+ 'is_include_timestamps' => false,+ 'status' => 'running',+ 'image' => 'docker.dragonflydb.io/dragonflydb/dragonfly:latest',+ 'is_public' => false,+ 'public_port' => 26381,+ 'ports_mappings' => '26381:6379',+ 'limits_memory' => '1g',+ 'limits_memory_swap' => '2g',+ 'limits_memory_swappiness' => 30,+ 'limits_memory_reservation' => '512m',+ 'limits_cpus' => '2',+ 'limits_cpuset' => '0-1',+ 'limits_cpu_shares' => 512,+ 'started_at' => now()->subDay()->toISOString(),+ 'restart_count' => 0,+ 'last_restart_at' => null,+ 'last_restart_type' => null,+ 'last_online_at' => now()->toISOString(),+ 'public_port_timeout' => 3600,+ 'enable_ssl' => false,+ 'custom_docker_run_options' => '',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);++ expect($db->exists)->toBeTrue();+ expect($db->uuid)->toBe('custom-dragonfly-uuid');+ expect($db->dragonfly_password)->toBe('dragonflypass123');+ expect($db->environment_id)->toBe($this->environment->id);+});++it('creates StandaloneClickhouse with all fillable attributes', function () {+ $db = StandaloneClickhouse::create([+ 'uuid' => 'custom-ch-uuid',+ 'name' => 'Full Fillable ClickHouse',+ 'description' => 'ClickHouse with all attrs',+ 'clickhouse_admin_user' => 'chadmin',+ 'clickhouse_admin_password' => 'chpass123',+ 'is_log_drain_enabled' => false,+ 'is_include_timestamps' => false,+ 'status' => 'running',+ 'image' => 'clickhouse/clickhouse-server:latest',+ 'is_public' => false,+ 'public_port' => 28123,+ 'ports_mappings' => '28123:8123',+ 'limits_memory' => '2g',+ 'limits_memory_swap' => '4g',+ 'limits_memory_swappiness' => 30,+ 'limits_memory_reservation' => '1g',+ 'limits_cpus' => '4',+ 'limits_cpuset' => '0-3',+ 'limits_cpu_shares' => 2048,+ 'started_at' => now()->subDay()->toISOString(),+ 'restart_count' => 0,+ 'last_restart_at' => null,+ 'last_restart_type' => null,+ 'last_online_at' => now()->toISOString(),+ 'public_port_timeout' => 3600,+ 'custom_docker_run_options' => '',+ 'clickhouse_db' => 'testdb',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);++ expect($db->exists)->toBeTrue();+ expect($db->uuid)->toBe('custom-ch-uuid');+ expect($db->clickhouse_admin_user)->toBe('chadmin');+ expect($db->clickhouse_db)->toBe('testdb');+ expect($db->environment_id)->toBe($this->environment->id);+});++it('creates SwarmDocker with all fillable attributes', function () {+ $swarm = SwarmDocker::create([+ 'server_id' => $this->server->id,+ 'name' => 'swarm-dest',+ 'network' => 'coolify-swarm',+ ]);++ expect($swarm->exists)->toBeTrue();+ expect($swarm->server_id)->toBe($this->server->id);+ expect($swarm->name)->toBe('swarm-dest');+ expect($swarm->network)->toBe('coolify-swarm');+});++it('creates StandaloneDocker with all fillable attributes', function () {+ $docker = StandaloneDocker::create([+ 'server_id' => $this->server->id,+ 'name' => 'standalone-dest',+ 'network' => 'coolify-standalone',+ ]);++ expect($docker->exists)->toBeTrue();+ expect($docker->server_id)->toBe($this->server->id);+ expect($docker->name)->toBe('standalone-dest');+ expect($docker->network)->toBe('coolify-standalone');+});++it('creates ScheduledTask with all fillable attributes', function () {+ $app = Application::create([+ 'name' => 'task-test-app',+ 'git_repository' => 'https://github.com/test/repo',+ 'git_branch' => 'main',+ 'build_pack' => 'nixpacks',+ 'ports_exposes' => '3000',+ 'environment_id' => $this->environment->id,+ 'destination_id' => $this->destination->id,+ 'destination_type' => $this->destination->getMorphClass(),+ ]);++ $task = ScheduledTask::create([+ 'uuid' => 'custom-task-uuid',+ 'enabled' => true,+ 'name' => 'Full Fillable Task',+ 'command' => 'php artisan schedule:run',+ 'frequency' => '* * * * *',+ 'container' => 'app',+ 'timeout' => 300,+ 'team_id' => $this->team->id,+ 'application_id' => $app->id,+ 'service_id' => null,+ ]);++ expect($task->exists)->toBeTrue();+ expect($task->uuid)->toBe('custom-task-uuid');+ expect($task->name)->toBe('Full Fillable Task');+ expect($task->command)->toBe('php artisan schedule:run');+ expect($task->frequency)->toBe('* * * * *');+ expect($task->container)->toBe('app');+ expect($task->timeout)->toBe(300);+ expect($task->team_id)->toBe($this->team->id);+ expect($task->application_id)->toBe($app->id);+});++it('creates ScheduledDatabaseBackup with all fillable attributes', function () {+ $db = StandalonePostgresql::create([+ 'name' => 'backup-test-pg',+ 'postgres_user' => 'user',+ 'postgres_password' => 'pass',+ 'postgres_db' => 'testdb',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);++ $backup = ScheduledDatabaseBackup::create([+ 'uuid' => 'custom-backup-uuid',+ 'team_id' => $this->team->id,+ 'description' => 'Full fillable backup',+ 'enabled' => true,+ 'save_s3' => false,+ 'frequency' => '0 2 * * *',+ 'database_backup_retention_amount_locally' => 10,+ 'database_type' => $db->getMorphClass(),+ 'database_id' => $db->id,+ 's3_storage_id' => null,+ 'databases_to_backup' => 'testdb',+ 'dump_all' => false,+ 'database_backup_retention_days_locally' => 30,+ 'database_backup_retention_max_storage_locally' => 5000,+ 'database_backup_retention_amount_s3' => 20,+ 'database_backup_retention_days_s3' => 60,+ 'database_backup_retention_max_storage_s3' => 10000,+ 'timeout' => 600,+ 'disable_local_backup' => false,+ ]);++ expect($backup->exists)->toBeTrue();+ expect($backup->uuid)->toBe('custom-backup-uuid');+ expect($backup->frequency)->toBe('0 2 * * *');+ expect($backup->database_backup_retention_amount_locally)->toBe(10);+ expect($backup->databases_to_backup)->toBe('testdb');+ expect($backup->timeout)->toBe(600);+});++it('creates ScheduledDatabaseBackupExecution with all fillable attributes', function () {+ $db = StandalonePostgresql::create([+ 'name' => 'exec-test-pg',+ 'postgres_user' => 'user',+ 'postgres_password' => 'pass',+ 'postgres_db' => 'testdb',+ 'destination_type' => $this->destination->getMorphClass(),+ 'destination_id' => $this->destination->id,+ 'environment_id' => $this->environment->id,+ ]);+ $backup = ScheduledDatabaseBackup::create([+ 'frequency' => '0 2 * * *',+ 'database_type' => $db->getMorphClass(),+ 'database_id' => $db->id,+ 'team_id' => $this->team->id,+ ]);++ $execution = ScheduledDatabaseBackupExecution::create([+ 'uuid' => 'custom-exec-uuid',+ 'scheduled_database_backup_id' => $backup->id,+ 'status' => 'success',+ 'message' => 'Backup completed successfully',+ 'size' => 1048576,+ 'filename' => 'backup-2026-03-31.sql.gz',+ 'database_name' => 'testdb',+ 'finished_at' => now()->toISOString(),+ 'local_storage_deleted' => false,+ 's3_storage_deleted' => false,+ 's3_uploaded' => false,+ ]);++ expect($execution->exists)->toBeTrue();+ expect($execution->uuid)->toBe('custom-exec-uuid');+ expect($execution->status)->toBe('success');+ expect($execution->filename)->toBe('backup-2026-03-31.sql.gz');+ expect($execution->database_name)->toBe('testdb');+ expect($execution->size)->toBe(1048576);+});++it('creates ScheduledTaskExecution with all fillable attributes', function () {+ $app = Application::create([+ 'name' => 'task-exec-app',+ 'git_repository' => 'https://github.com/test/repo',+ 'git_branch' => 'main',+ 'build_pack' => 'nixpacks',+ 'ports_exposes' => '3000',+ 'environment_id' => $this->environment->id,+ 'destination_id' => $this->destination->id,+ 'destination_type' => $this->destination->getMorphClass(),+ ]);+ $task = ScheduledTask::create([+ 'name' => 'exec-test-task',+ 'command' => 'echo hello',+ 'frequency' => '* * * * *',+ 'timeout' => 60,+ 'team_id' => $this->team->id,+ 'application_id' => $app->id,+ ]);++ $execution = ScheduledTaskExecution::create([+ 'scheduled_task_id' => $task->id,+ 'status' => 'success',+ 'message' => 'Task completed successfully',+ 'finished_at' => now()->toISOString(),+ 'started_at' => now()->subMinute()->toISOString(),+ 'retry_count' => 0,+ 'duration' => 60,+ 'error_details' => null,+ ]);++ expect($execution->exists)->toBeTrue();+ expect($execution->scheduled_task_id)->toBe($task->id);+ expect($execution->status)->toBe('success');+ expect((float) $execution->duration)->toBe(60.0);+ expect($execution->retry_count)->toBe(0);+});++it('creates GithubApp with all fillable attributes', function () {+ $githubApp = GithubApp::create([+ 'team_id' => $this->team->id,+ 'private_key_id' => $this->server->private_key_id,+ 'name' => 'Full Fillable GH App',+ 'organization' => 'coollabsio',+ 'api_url' => 'https://api.github.com',+ 'html_url' => 'https://github.com',+ 'custom_user' => 'git',+ 'custom_port' => 22,+ 'app_id' => 12345,+ 'installation_id' => 67890,+ 'client_id' => 'Iv1.abc123',+ 'client_secret' => 'secret-456',+ 'webhook_secret' => 'whsec-789',+ 'is_system_wide' => false,+ 'is_public' => false,+ 'contents' => 'read',+ 'metadata' => 'read',+ 'pull_requests' => 'write',+ 'administration' => 'read',+ ]);++ expect($githubApp->exists)->toBeTrue();+ expect($githubApp->name)->toBe('Full Fillable GH App');+ expect($githubApp->organization)->toBe('coollabsio');+ expect($githubApp->app_id)->toBe(12345);+ expect($githubApp->installation_id)->toBe(67890);+ expect($githubApp->client_id)->toBe('Iv1.abc123');+ expect($githubApp->team_id)->toBe($this->team->id);+ expect($githubApp->private_key_id)->toBe($this->server->private_key_id);+});++it('creates Subscription with all fillable attributes', function () {+ $sub = Subscription::create([+ 'team_id' => $this->team->id,+ 'stripe_invoice_paid' => true,+ 'stripe_subscription_id' => 'sub_1234567890',+ 'stripe_customer_id' => 'cus_1234567890',+ 'stripe_cancel_at_period_end' => false,+ 'stripe_plan_id' => 'price_1234567890',+ 'stripe_feedback' => 'Great service',+ 'stripe_comment' => 'Will renew',+ 'stripe_trial_already_ended' => true,+ 'stripe_past_due' => false,+ 'stripe_refunded_at' => null,+ ]);++ expect($sub->exists)->toBeTrue();+ expect($sub->team_id)->toBe($this->team->id);+ expect($sub->stripe_subscription_id)->toBe('sub_1234567890');+ expect($sub->stripe_customer_id)->toBe('cus_1234567890');+ expect($sub->stripe_plan_id)->toBe('price_1234567890');+ expect($sub->stripe_invoice_paid)->toBeTrue();+});++it('creates CloudProviderToken with all fillable attributes', function () {+ $token = CloudProviderToken::create([+ 'team_id' => $this->team->id,+ 'provider' => 'hetzner',+ 'token' => 'hcloud-token-abc123',+ 'name' => 'My Hetzner Token',+ ]);++ expect($token->exists)->toBeTrue();+ expect($token->team_id)->toBe($this->team->id);+ expect($token->provider)->toBe('hetzner');+ expect($token->token)->toBe('hcloud-token-abc123');+ expect($token->name)->toBe('My Hetzner Token');+});++it('creates Tag with all fillable attributes', function () {+ $tag = Tag::create([+ 'name' => 'production',+ 'team_id' => $this->team->id,+ ]);++ expect($tag->exists)->toBeTrue();+ expect($tag->name)->toBe('production');+ expect($tag->team_id)->toBe($this->team->id);+});diff --git a/tests/Feature/ServiceDatabaseTeamTest.php b/tests/Feature/ServiceDatabaseTeamTest.phpindex ae3cba4d37..5fe7e39d2d 100644--- a/tests/Feature/ServiceDatabaseTeamTest.php+++ b/tests/Feature/ServiceDatabaseTeamTest.php@@ -14,18 +14,18 @@ uses(RefreshDatabase::class);it('returns the correct team through the service relationship chain', function () {$team = Team::factory()->create();- $project = Project::forceCreate([+ $project = Project::create(['uuid' => (string) Str::uuid(),'name' => 'Test Project','team_id' => $team->id,]);- $environment = Environment::forceCreate([+ $environment = Environment::create(['name' => 'test-env-'.Str::random(8),'project_id' => $project->id,]);- $service = Service::forceCreate([+ $service = Service::create(['uuid' => (string) Str::uuid(),'name' => 'supabase','environment_id' => $environment->id,@@ -34,7 +34,7 @@ it('returns the correct team through the service relationship chain', function ('docker_compose_raw' => 'version: "3"',]);- $serviceDatabase = ServiceDatabase::forceCreate([+ $serviceDatabase = ServiceDatabase::create(['uuid' => (string) Str::uuid(),'name' => 'supabase-db','service_id' => $service->id,@@ -47,18 +47,18 @@ it('returns the correct team through the service relationship chain', function (it('returns the correct team for ServiceApplication through the service relationship chain', function () {$team = Team::factory()->create();- $project = Project::forceCreate([+ $project = Project::create(['uuid' => (string) Str::uuid(),'name' => 'Test Project','team_id' => $team->id,]);- $environment = Environment::forceCreate([+ $environment = Environment::create(['name' => 'test-env-'.Str::random(8),'project_id' => $project->id,]);- $service = Service::forceCreate([+ $service = Service::create(['uuid' => (string) Str::uuid(),'name' => 'supabase','environment_id' => $environment->id,@@ -67,7 +67,7 @@ it('returns the correct team for ServiceApplication through the service relation'docker_compose_raw' => 'version: "3"',]);- $serviceApplication = ServiceApplication::forceCreate([+ $serviceApplication = ServiceApplication::create(['uuid' => (string) Str::uuid(),'name' => 'supabase-studio','service_id' => $service->id,diff --git a/tests/Feature/StorageApiTest.php b/tests/Feature/StorageApiTest.phpindex bd9d727c43..75357e41ec 100644--- a/tests/Feature/StorageApiTest.php+++ b/tests/Feature/StorageApiTest.php@@ -49,7 +49,7 @@ function createTestApplication($context): Applicationfunction createTestDatabase($context): StandalonePostgresql{- return StandalonePostgresql::forceCreate([+ return StandalonePostgresql::create(['name' => 'test-postgres','image' => 'postgres:15-alpine','postgres_user' => 'postgres',diff --git a/tests/Unit/GitRefValidationTest.php b/tests/Unit/GitRefValidationTest.phpindex 58d07f4b75..f82dcb863f 100644--- a/tests/Unit/GitRefValidationTest.php+++ b/tests/Unit/GitRefValidationTest.php@@ -1,12 +1,14 @@<?php+use App\Models\Application;+use App\Models\ApplicationSetting;+/*** Security tests for git ref validation (GHSA-mw5w-2vvh-mgf4).** Ensures that git_commit_sha and related inputs are validated* to prevent OS command injection via shell metacharacters.*/-describe('validateGitRef', function () {test('accepts valid hex commit SHAs', function () {expect(validateGitRef('abc123def456'))->toBe('abc123def456');@@ -93,31 +95,31 @@ describe('validateGitRef', function () {describe('executeInDocker git log escaping', function () {test('git log command escapes commit SHA to prevent injection', function () {$maliciousCommit = "HEAD'; id; #";- $command = "cd /workdir && git log -1 ".escapeshellarg($maliciousCommit).' --pretty=%B';+ $command = 'cd /workdir && git log -1 '.escapeshellarg($maliciousCommit).' --pretty=%B';$result = executeInDocker('test-container', $command);// The malicious payload must not be able to break out of quoting- expect($result)->not->toContain("id;");+ expect($result)->not->toContain('id;');expect($result)->toContain("'HEAD'\\''");});});describe('buildGitCheckoutCommand escaping', function () {test('checkout command escapes target to prevent injection', function () {- $app = new \App\Models\Application;- $app->forceFill(['uuid' => 'test-uuid']);+ $app = new Application;+ $app->fill(['uuid' => 'test-uuid']);- $settings = new \App\Models\ApplicationSetting;+ $settings = new ApplicationSetting;$settings->is_git_submodules_enabled = false;$app->setRelation('settings', $settings);- $method = new \ReflectionMethod($app, 'buildGitCheckoutCommand');+ $method = new ReflectionMethod($app, 'buildGitCheckoutCommand');$result = $method->invoke($app, 'abc123');expect($result)->toContain("git checkout 'abc123'");$result = $method->invoke($app, "abc'; id; #");- expect($result)->not->toContain("id;");+ expect($result)->not->toContain('id;');expect($result)->toContain("git checkout 'abc'");});});diff --git a/tests/Unit/ModelFillableRegressionTest.php b/tests/Unit/ModelFillableRegressionTest.phpnew file mode 100644index 0000000000..eff477c5a5--- /dev/null+++ b/tests/Unit/ModelFillableRegressionTest.php@@ -0,0 +1,76 @@+<?php++use App\Models\Application;+use App\Models\ApplicationDeploymentQueue;+use App\Models\ApplicationPreview;+use App\Models\ApplicationSetting;+use App\Models\CloudProviderToken;+use App\Models\Environment;+use App\Models\GithubApp;+use App\Models\Project;+use App\Models\ProjectSetting;+use App\Models\ScheduledDatabaseBackup;+use App\Models\ScheduledDatabaseBackupExecution;+use App\Models\ScheduledTask;+use App\Models\ScheduledTaskExecution;+use App\Models\Server;+use App\Models\ServerSetting;+use App\Models\Service;+use App\Models\ServiceApplication;+use App\Models\ServiceDatabase;+use App\Models\StandaloneClickhouse;+use App\Models\StandaloneDocker;+use App\Models\StandaloneDragonfly;+use App\Models\StandaloneKeydb;+use App\Models\StandaloneMariadb;+use App\Models\StandaloneMongodb;+use App\Models\StandaloneMysql;+use App\Models\StandalonePostgresql;+use App\Models\StandaloneRedis;+use App\Models\Subscription;+use App\Models\SwarmDocker;+use App\Models\Tag;+use App\Models\User;++it('keeps required mass-assignment attributes fillable for internal create flows', function (string $modelClass, array $expectedAttributes) {+ $model = new $modelClass;++ expect($model->getFillable())->toContain(...$expectedAttributes);+})->with([+ // Relationship/ownership keys+ [CloudProviderToken::class, ['team_id']],+ [Tag::class, ['team_id']],+ [Subscription::class, ['team_id']],+ [ScheduledTaskExecution::class, ['scheduled_task_id']],+ [ScheduledDatabaseBackupExecution::class, ['uuid', 'scheduled_database_backup_id']],+ [ScheduledDatabaseBackup::class, ['uuid', 'team_id']],+ [ScheduledTask::class, ['uuid', 'team_id', 'application_id', 'service_id']],+ [ServiceDatabase::class, ['service_id']],+ [ServiceApplication::class, ['service_id']],+ [ApplicationDeploymentQueue::class, ['docker_registry_image_tag']],+ [Project::class, ['team_id', 'uuid']],+ [Environment::class, ['project_id', 'uuid']],+ [ProjectSetting::class, ['project_id']],+ [ApplicationSetting::class, ['application_id']],+ [ServerSetting::class, ['server_id']],+ [SwarmDocker::class, ['server_id']],+ [StandaloneDocker::class, ['server_id']],+ [User::class, ['pending_email', 'email_change_code', 'email_change_code_expires_at']],+ [Server::class, ['ip_previous']],+ [GithubApp::class, ['team_id', 'private_key_id']],++ // Application/Service resource keys (including uuid for clone flows)+ [Application::class, ['uuid', 'environment_id', 'destination_id', 'destination_type', 'source_id', 'source_type', 'repository_project_id', 'private_key_id']],+ [ApplicationPreview::class, ['uuid', 'application_id']],+ [Service::class, ['uuid', 'environment_id', 'server_id', 'destination_id', 'destination_type']],++ // Standalone database resource keys (including uuid for clone flows)+ [StandalonePostgresql::class, ['uuid', 'destination_type', 'destination_id', 'environment_id']],+ [StandaloneMysql::class, ['uuid', 'destination_type', 'destination_id', 'environment_id']],+ [StandaloneMariadb::class, ['uuid', 'destination_type', 'destination_id', 'environment_id']],+ [StandaloneMongodb::class, ['uuid', 'destination_type', 'destination_id', 'environment_id']],+ [StandaloneRedis::class, ['uuid', 'destination_type', 'destination_id', 'environment_id']],+ [StandaloneKeydb::class, ['uuid', 'destination_type', 'destination_id', 'environment_id']],+ [StandaloneDragonfly::class, ['uuid', 'destination_type', 'destination_id', 'environment_id']],+ [StandaloneClickhouse::class, ['uuid', 'destination_type', 'destination_id', 'environment_id']],+]);diff --git a/tests/Unit/ServiceParserImageUpdateTest.php b/tests/Unit/ServiceParserImageUpdateTest.phpindex 6497958662..f672b64f52 100644--- a/tests/Unit/ServiceParserImageUpdateTest.php+++ b/tests/Unit/ServiceParserImageUpdateTest.php@@ -16,8 +16,8 @@ it('ensures service parser does not include image in trusted service creation quexpect($parsersFile)->toContain("\$databaseFound = ServiceDatabase::where('name', \$serviceName)->where('service_id', \$resource->id)->first();")->toContain("\$applicationFound = ServiceApplication::where('name', \$serviceName)->where('service_id', \$resource->id)->first();")- ->toContain("forceCreate([\n 'name' => \$serviceName,\n 'service_id' => \$resource->id,\n ]);")- ->not->toContain("forceCreate([\n 'name' => \$serviceName,\n 'image' => \$image,\n 'service_id' => \$resource->id,\n ]);");+ ->toContain("create([\n 'name' => \$serviceName,\n 'service_id' => \$resource->id,\n ]);")+ ->not->toContain("create([\n 'name' => \$serviceName,\n 'image' => \$image,\n 'service_id' => \$resource->id,\n ]);");});it('ensures service parser updates image after finding or creating service', function () {@@ -41,8 +41,8 @@ it('ensures parseDockerComposeFile does not create duplicates on null savedServi// The new code checks for null within the else block and creates only if neededexpect($sharedFile)->toContain('if (is_null($savedService)) {')- ->toContain('$savedService = ServiceDatabase::forceCreate([')- ->toContain('$savedService = ServiceApplication::forceCreate([');+ ->toContain('$savedService = ServiceDatabase::create([')+ ->toContain('$savedService = ServiceApplication::create([');});it('verifies image update logic is present in parseDockerComposeFile', function () {diff --git a/tests/v4/Browser/DashboardTest.php b/tests/v4/Browser/DashboardTest.phpindex 233b0db9de..b4a97f2680 100644--- a/tests/v4/Browser/DashboardTest.php+++ b/tests/v4/Browser/DashboardTest.php@@ -77,21 +77,21 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==],]);- Project::forceCreate([+ Project::create(['uuid' => 'project-1','name' => 'My first project','description' => 'This is a test project in development','team_id' => 0,]);- Project::forceCreate([+ Project::create(['uuid' => 'project-2','name' => 'Production API','description' => 'Backend services for production','team_id' => 0,]);- Project::forceCreate([+ Project::create(['uuid' => 'project-3','name' => 'Staging Environment','description' => 'Staging and QA testing',