This repository was archived by the owner on Nov 30, 2026. It is now read-only.
Repository navigation
Add database-cluster:start and database-cluster:stop - #306
Closed
joetannenbaum wants to merge 1 commit into
Closed
joetannenbaum wants to merge 1 commit into
joetannenbaum wants to merge 1 commit into
Conversation
The API can now start and stop a Laravel MySQL or Serverless Postgres
database cluster (POST /databases/clusters/{database}/start and /stop).
Both commands resolve the cluster like database-cluster:get and output
the updated cluster with --json. Stopping cuts environments off from the
cluster, so database-cluster:stop confirms and needs --force when
non-interactive.
A Serverless Postgres cluster comes back on a new hostname, so after
starting one, database-cluster:start tells a person to redeploy the
environments connected to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T1Sq4Y2hkEm7aPHvpU9eP2
joetannenbaum
force-pushed
the
api-sync/database-clusters
branch
from
November 25, 2026 18:09
5a89d60 to
1cac7f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
database-cluster:startanddatabase-cluster:stopfor the two database cluster endpoints in the current API spec that the CLI didn't cover.Findings
POST /databases/clusters/{database}/startDatabaseResource. A Serverless Postgres cluster gets a new hostname when it starts, so connected environments need a redeploy.POST /databases/clusters/{database}/stopDatabaseResource.Neither takes a request body. Both need the
database_cluster.editpermission.The start description mentions
data.meta.redeploy_required, butDatabaseResourcedeclares nometa, so the command doesn't read it. It checks the cluster's type (neon_serverless_postgres) instead.Changes
StartDatabaseClusterRequest/StopDatabaseClusterRequest, plusstart()andstop()onDatabaseClustersResource.database-cluster:start {cluster?}anddatabase-cluster:stop {cluster?} {--force}, aliaseddb-cluster:start/db-cluster:stoplike the other cluster commands. They resolve the cluster the waydatabase-cluster:getdoes (ID or name, picker when interactive) and print the returned cluster with--json, using the sameDatabaseClusterDTO.--jsonoutput.database-cluster:stopgoes throughconfirmDestructive()and needs--forcewhen non-interactive.database-cluster:startdoesn't confirm.Tests
tests/Feature/DatabaseClusterStartStopTest.phpcovers the request each command sends, the--jsonshape, the redeploy warning (shown for Serverless Postgres, not for MySQL, never in JSON), and thatdatabase-cluster:stoprefuses to run headlessly without--force. The full suite (PromptFallbackTestskipped locally), PHPStan and Pint pass, re-run after rebasing on the currentmain.Demo
This session could not embed the GIFs inline: image markdown was stripped on its way to GitHub, so they are plain links. Add a
!before each to make it play inline.cloud database-cluster:start
database-cluster:startwith no argument: pick a cluster; starting a Serverless Postgres cluster ends with the redeploy warning.cloud database-cluster:stop
database-cluster:stopwith no argument: pick a cluster, confirm, then it stops.Generated by Claude Code