Add --min-storage and --max-storage flags to database and branch creation#1246
Merged
Add --min-storage and --max-storage flags to database and branch creation#1246
Conversation
…tion Allow users to configure minimum and maximum storage size (in bytes) when creating PostgreSQL databases and branches. Returns a clear error if used with MySQL databases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nickvanw
approved these changes
Apr 7, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Users running automated import workflows need to configure storage size at database creation time. Without this, they have to create a database with the default minimum storage and immediately resize — often hitting storage limits before the resize takes effect (planetscale/surfaces#3485).
The API now supports storage configuration at creation time (planetscale/api-bb#18339, planetscale/api-bb#18389), and the SDK has been updated to match (planetscale/planetscale-go#303). This PR exposes those parameters in the CLI.
Usage
Flags accept bytes, consistent with existing CLI conventions (e.g.,
--max-query-size). Storage flags are only supported for PostgreSQL — the CLI returns a clear error if used with a MySQL database or branch.Blocked on: a new release of
planetscale-goafter planetscale/planetscale-go#303 is merged.go.modwill need to be updated to the new version before this can pass CI.Test plan
TestDatabase_CreateCmdWithStorageTestDatabase_CreateCmdWithStorageMySQLErrorTestBranch_CreateCmdWithStorageTestBranch_CreateCmdWithStorageMySQLError🤖 Generated with Claude Code