Manage PostgreSQL Databases via GraphQL API
rocket_new
PROOP

10 hours ago

When a new PostgreSQL service is provisioned, Railway creates a single default database (railway). For many applications, a single PostgreSQL instance hosts multiple logical databases (e.g. user_db, inventory_db, analytics_db) to separate services while sharing the same infrastructure.

Currently, creating additional databases requires connecting directly to the PostgreSQL instance and executing CREATE DATABASE. While this works, it's difficult to automate when provisioning infrastructure through the Railway API.

It would be valuable if the GraphQL API exposed database management operations, such as:

Create a new database within an existing PostgreSQL service.

List existing databases.

Delete a database (with appropriate safeguards).

Optionally configure database ownership/permissions.

This would enable fully automated infrastructure provisioning without requiring an additional PostgreSQL connection solely to execute administrative SQL commands. It would also make Infrastructure as Code workflows cleaner and simplify CI/CD pipelines, where everything can be managed through Railway's API instead of mixing API calls with direct database connections.

This feature would be especially useful for platforms that provision isolated databases for customers, multi-tenant applications, preview environments, and automated deployment workflows.

Under Review

0 Threads mention this feature

0 Replies

Welcome!

Sign in to your Railway account to join the conversation.

Loading...