PostgreSQL

A real PostgreSQL database for every project.

CubiBase provisions one PostgreSQL database per project. The database is created when provisioning finishes, not at the moment you type the project name. Other projects cannot query it. Developer accounts live in a different database, cubibase_meta.

Console
example-projectActive

customers

customers
nameemailplan
Mina Cho[email protected]pro
Jonah Hale[email protected]starter
Priya Shah[email protected]pro
Northwind Supply[email protected]team

iduuidnametextemailtextplantextowner_idtext

GEThttps://example-project.api.cubibase.com/rest/v1/customers

What “dedicated” means here

The project record stores the slug, the status, and the connection details for that database. Application data goes in the project database. Accounts, sessions, and the project registry stay in cubibase_meta.

  • One slug, such as example-project, maps to one database, such as example_project_db.
  • The Data API resolves the slug from the Host header. It does not trust X-Forwarded-Host.
  • Provisioning is a job. The Console can show whether the project is still provisioning, active, or failed.
  • A failed provision can be retried by the project owner. A retry does not create a second database for a project that is already active.

You still use SQL

Tables you create through CubiBase are ordinary PostgreSQL tables in the public schema. Column types include uuid, text, integer, bigint, boolean, timestamptz, jsonb, numeric, and double precision. A table needs exactly one primary key.

The Console SQL editor is for reading. It runs one read-only statement on a SQL role inside a read-only transaction. Changing columns is a schema operation, not an ad hoc script in that box.

Four roles, none of them a superuser

Provisioning creates four login roles for the project database. Each is NOSUPERUSER and NOBYPASSRLS.

  • The DDL role creates tables from the schema API.
  • The API role runs Data API requests, and only after you grant an operation by exposing it.
  • The SQL role serves the Console row browser and the read-only SQL editor.
  • The auth role runs the sign-up, sign-in, and session flows against the managed auth schema.

Schemas the platform manages

Your tables live in public. Alongside it, provisioning creates managed schemas: auth holds end users, refresh sessions, and MFA factors; logs holds request and auth events written by the platform; vault holds project secrets that no request role can read.

The SQL role can read auth tables and logs from the Console SQL editor. The Data API serves public tables you expose, and the auth endpoints are the application path to user accounts.

Questions

When does the database exist?

After the provisioning job completes and the project status is active. Registration of the project alone does not create the database.

Can two apps share one CubiBase database?

Put them in the same project only if they should share that database. If they should be isolated, create two projects. CubiBase does not offer a shared schema as a substitute for a separate database.

Open the Console.

Create a project when you are ready to provision a database.

first request
GET /rest/v1/customersapikey: cb_pub_…Authorization: Bearer <JWT>200 · { "data": [ … ] }