feat(planetscale): check unchangeable props with adopt: true#1357
Merged
Mkassabov merged 3 commits intoalchemy-run:mainfrom Mar 6, 2026
Conversation
Mkassabov
reviewed
Mar 6, 2026
Collaborator
Mkassabov
left a comment
There was a problem hiding this comment.
I know this is marked as a draft but I left a few quick comments.
This is a very valuable change and makes me want to re-discuss with the team what adoption looks like in the next version of alchemy so we don't run into problems like this again. So thank you!
Feel free to @ me when you feel this is done and I can review & merge.
…e, add docs links
Address PR review feedback:
- Rename actualRegion to region on Branch and Database output types
(outputs overwrite inputs with actual values per alchemy convention)
- Drop displayName from region output (redundant)
- Use concise region: { slug: data.region.slug } in return statements
- Add @see links to PlanetScale regions docs
- Fix example slugs to include GCP regions
Contributor
Author
|
@Mkassabov thanks for the feedback - I've addressed your comments and marked ready for review |
Mkassabov
approved these changes
Mar 6, 2026
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.
Hi! At https://github.com/iterate/iterate we use
adopt: truewith planetscale for our DB created by hand. It'd be good to still be able to kinda specify the database region as an assertion, since the impacts of the wrong region are very big.This eliminates the risk of setting
region: "aws-eu-west-2"and happily and confidently going ahead with a database that's in the wrong continent without realising. (It doesn't fix it, but it at least fails the deployment and prompts us to fix it).Also validates
kindandarchon adopt. These are also immutable after creation and were previously silently trusted from props (so you could adopt a mysql db while claiming it's postgresql, and downstream code would act on the wrong kind).Branch region is also covered: branches can be in different regions from the database, so the
Branchresource now acceptsregionand validates it on adopt too.actualRegionis exposed in bothDatabaseandBranchoutputs.