create(); $server = Server::factory()->create(['team_id' => $team->id]); $project = Project::factory()->create(['team_id' => $team->id]); $environment = Environment::factory()->create(['project_id' => $project->id]); $destination = $server->standaloneDockers()->firstOrFail(); $database = StandalonePostgresql::create([ 'name' => 'config-hash-db', 'postgres_user' => 'postgres', 'postgres_password' => encrypt('password'), 'postgres_db' => 'app', 'image' => 'postgres:16-alpine', 'environment_id' => $environment->id, 'destination_id' => $destination->id, 'destination_type' => $destination->getMorphClass(), ]); $variable = $database->environment_variables()->create([ 'key' => 'APP_SECRET', 'value' => 'original-value', ]); $database->isConfigurationChanged(save: true); expect($database->refresh()->isConfigurationChanged())->toBeFalse(); $variable->update(['value' => 'changed-value']); expect($database->refresh()->isConfigurationChanged())->toBeTrue(); });