db
db
The db commands.
A managed database is a PostgreSQL instance the platform provisions and keeps running. Inside one there are roles, which are logins, and databases, which is where the tables live. These commands create the instance and everything in it, and hand back a connection string when something needs one.
Only PostgreSQL is managed. Anything else is run as an ordinary application with a disk, and does not appear here.
Commands
| Command | What It Does | Risk |
|---|---|---|
db list | List the team's managed databases. | read |
db get | Show one database and what is inside it. | read |
db url | Print a connection string. | read |
db create | Provision a managed PostgreSQL database. | write |
db delete | Permanently destroy a database. | destructive |
db role list | List the logins a database accepts. | read |
db role create | Add a login to a database. | write |
db role delete | Remove a login. | destructive |
db database list | List the databases inside a managed instance. | read |
db database create | Add a database inside a managed instance. | write |
db database delete | Destroy a database inside an instance. | destructive |