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.

Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.

Functions§

create_database_for_tenant
drop_database_for_tenant
ensure_admin_role
sanitize_database_name