Skip to main content

Module database

Module database 

Source
Expand description

Per-tenant database operations inside the shared PostgreSQL container.

Creates, drops, and authorises tenant databases by running psql via docker exec, sanitising identifiers before they reach the SQL text.

Functionsยง

create_database_for_tenant
drop_database_for_tenant
ensure_admin_role
sanitize_database_name