What this means
What this means
Your app connects with a DATABASE_URL, the standard PostgreSQL connection string. Inside CM Cloud it goes through a connection pooler, which is what keeps the database usable as your app scales and redeploys.
Before you start
Before you start
Have the database created, and know where your framework reads environment variables from.
Step-by-step guidance
Step-by-step guidance
- In the Connection tab, select Show connection details.
- Copy DATABASE_URL exactly — it already contains the host, port, user, password and database name.
- Add it to your app's environment in the portal, then redeploy.
- Run your migrations.
- Open the Tables tab in the console to confirm the tables exist and hold rows.
What CM Cloud support will review
What CM Cloud support will review
Support can check that the variable is present in the running app and that the database is reachable from your runtime node.
What is not automated yet
What is not automated yet
Because connections go through a pooler in transaction mode, LISTEN/NOTIFY, session advisory locks, and SET statements that must persist across statements do not work. Normal queries, transactions and migrations are unaffected. If your app needs those features, tell support before you build on them.
Safety note
Safety note
The console connects as a read-only login, so looking at your data through it cannot change it. Your application keeps its own login, which can write.
Safe next action
Safe next action
Set DATABASE_URL in your app's environment, redeploy, and confirm a write from your app shows up in the Tables tab.