Skip to content

Databases CLI reference

View as Markdown

Source: @socra/db-cli@0.0.1.

This reference includes every command, argument, and option declared by this released package. Defaults and accepted values are included where the package declares them. Command-specific validation and permissions also apply; see the API reference for resource contracts.

Use socra db --help, or append --help to any command, to inspect the locally installed version.

socra db

Provision and operate managed PostgreSQL databases

CommandPurpose
socra db createCreate a managed database
socra db listList managed databases
socra db getGet a managed database
socra db connectStore DATABASE_URL in Socra Secret and return its version reference
socra db updateRename a managed database
socra db deleteDelete a managed database and its isolated runtime resources

socra db create

Create a managed database

Text
socra db create <name> [options]

Arguments

ArgumentRequiredDescription
nameYesDatabase name

Options

OptionInputDescription
--projectValueOwning Socra project
--storageValuePersistent storage in GiB (default 10)

socra db list

List managed databases

Text
socra db list [options]

Options

OptionInputDescription
--projectValueOwning Socra project
--limitValueMaximum rows to return
--afterValueCursor from a previous page

socra db get

Get a managed database

Text
socra db get <id> [options]

Arguments

ArgumentRequiredDescription
idYesDatabase id, e.g. db_…

Options

OptionInputDescription
--projectValueOwning Socra project

socra db connect

Store DATABASE_URL in Socra Secret and return its version reference

Text
socra db connect <id> [options]

Arguments

ArgumentRequiredDescription
idYesDatabase id, e.g. db_…

Options

OptionInputDescription
--projectValueOwning Socra project
--secret-nameValueOptional Socra Secret name

socra db update

Rename a managed database

Text
socra db update <id> [options]

Arguments

ArgumentRequiredDescription
idYesDatabase id, e.g. db_…

Options

OptionInputDescription
--projectValueOwning Socra project
--nameValueNew database name

socra db delete

Delete a managed database and its isolated runtime resources

Text
socra db delete <id> [options]

Arguments

ArgumentRequiredDescription
idYesDatabase id, e.g. db_…

Options

OptionInputDescription
--projectValueOwning Socra project

Next step

Return to the Databases overview.