Skip to content

Follow the API's move to versionless database types - #222

Merged
taylorotwell merged 1 commit into
mainfrom
fix/versionless-database-types
Sep 15, 2026
Merged

taylorotwell merged 1 commit into
mainfrom
fix/versionless-database-types

Conversation

@andrevalentin

Copy link
Copy Markdown
Member

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 ship and cloud database-cluster:create failed before reaching the create step.

What

  • DatabaseClusterPreset is keyed on the versionless types. Presets are unchanged.
  • The DatabaseType DTO keeps the versions the API lists for each type.
  • Cluster creation sends type and version.
  • cloud ship --database: postgres and mysql track the newest release available, postgres17 and friends stay pinned, and the previous identifiers such as neon_serverless_postgres_18 remain accepted as input. A version that is not available is rejected up front with the list of available ones.
  • cloud database-cluster:create gains --engine-version (--version is reserved by the console) and prompts for a version interactively, defaulting to the newest.
  • Feature tests mock the types endpoint with the shape the API serves today, covering ship and database-cluster:create.

Verification

Reproduced the failure with the current main against 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

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
@laravel laravel locked and limited conversation to collaborators Sep 13, 2026
@andrevalentin
andrevalentin deleted the fix/versionless-database-types branch September 13, 2026 20:04
@andrevalentin
andrevalentin restored the fix/versionless-database-types branch September 14, 2026 23:26
@laravel laravel unlocked this conversation Sep 14, 2026
@andrevalentin andrevalentin reopened this Sep 14, 2026
@taylorotwell
taylorotwell merged commit 34b548c into main Sep 15, 2026
10 checks passed
@taylorotwell
taylorotwell deleted the fix/versionless-database-types branch September 15, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants