Skip to content

Use Managed Postgres in the Rails databases cookbook - #2674

Merged
alexleventer merged 1 commit into
mainfrom
rails-db-mpg
Nov 26, 2026
Merged

alexleventer merged 1 commit into
mainfrom
rails-db-mpg

Conversation

@alexleventer

Copy link
Copy Markdown
Contributor

Claude (Claude Code) wrote this change from an agent-readiness review.

Summary of changes

The Rails with Databases cookbook told readers to run flyctl postgres create and flyctl postgres attach, which create an unmanaged Fly Postgres cluster. Agents following it end up on unsupported Postgres instead of Managed Postgres.

  • Replace them with fly mpg create, then fly mpg list to find the cluster ID and fly mpg attach <CLUSTER_ID>. fly mpg attach takes a cluster ID, not a name, and sets DATABASE_URL by default (internal/command/mpg/attach.go, --variable-name defaults to DATABASE_URL). The wording follows Create and connect.
  • Drop the paragraph about the Fly Postgres link that flyctl postgres create prints.
  • Update the two other mentions: the page description and the MySQL section's "taken care of by flyctl postgres attach".

Preview

https://docs.fly.io/rails/cookbooks/databases/ (after merge)

Related Fly.io community and GitHub links

Notes

I checked the commands and flags against flyctl v0.5.14 source. I didn't run them against a live org.

Replace flyctl postgres create/attach, which make an unmanaged
cluster, with fly mpg create and fly mpg attach.
@alexleventer
alexleventer requested a review from a team as a code owner November 22, 2026 19:42
@mintlify

mintlify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
fly-io 🟢 Ready View Preview Nov 22, 2026, 7:43 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@alexleventer
alexleventer merged commit c836452 into main Nov 26, 2026
2 checks passed
@alexleventer
alexleventer deleted the rails-db-mpg branch November 26, 2026 14:55
@foundations-pr-bot foundations-pr-bot Bot added the narrow Changes the product itself (set by foundations-pr-bot or a person) label Nov 26, 2026

This branch was successfully deployed

1 active deployment
staging — 75d14d87 Deployed Nov 22, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

narrow Changes the product itself (set by foundations-pr-bot or a person)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant