Follow the API's move to versionless database types - #222
Merged
Merged
Conversation
The Laravel Cloud API now describes each database type without the engine version baked into its identifier and lists the supported versions separately. The CLI still keyed its presets on the old versioned identifiers, so the type list came back empty and both `cloud ship` and `database-cluster:create` failed before reaching the create step. Key the presets on the versionless types, keep the versions the API lists for each type, and send `type` plus `version` when creating a cluster. `--database` aliases without a version (`postgres`, `mysql`) track the newest release available, `postgres17` and friends stay pinned, and the previous identifiers remain accepted as input. `database-cluster:create` gains `--engine-version` (`--version` is taken by the console) and prompts for a version interactively, defaulting to the newest. Add feature tests that mock the types endpoint with the shape the API serves today. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TW1oE3eQZGhADwxayPwVsa
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
The Laravel Cloud API now describes each database type without the engine version baked into its identifier, and lists the supported versions separately. The CLI still expected the older versioned identifiers, so the type list it received came back empty and both
cloud shipandcloud database-cluster:createfailed before reaching the create step.What
DatabaseClusterPresetis keyed on the versionless types. Presets are unchanged.DatabaseTypeDTO keeps the versions the API lists for each type.typeandversion.cloud ship --database:postgresandmysqltrack the newest release available,postgres17and friends stay pinned, and the previous identifiers such asneon_serverless_postgres_18remain accepted as input. A version that is not available is rejected up front with the list of available ones.cloud database-cluster:creategains--engine-version(--versionis reserved by the console) and prompts for a version interactively, defaulting to the newest.shipanddatabase-cluster:create.Verification
Reproduced the failure with the current
mainagainst the live API, then created a Serverless Postgres 18 cluster with this branch, confirmed it in the dashboard, and deleted it again. Pint and PHPStan pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01TW1oE3eQZGhADwxayPwVsa