Database Schema and User Management Utilities#
(For downstream apps and services with their own database schemas)#
|
Base class for representing user types. |
|
Create a new database user with the specified role. |
|
Drop a user or users if they exist. |
|
Ensure that a role exists and applies the role hierarchy. |
|
Grant a UserRole to a user(s). |
|
Check if a role exists. |
|
Check whether an extending role has been granted a base role. |
|
Check if a group of roles exist - calls has_role for each role. |
|
Create a schema. |
|
Drop a schema and all its contents (if it exists). |
|
Check if a schema exists. |
|
Determine which objects in a schema need to be transferred to a new owner. |
|
Transfer ownership of a database object to a new owner. |
|
Context manager to temporarily switch database roles. |
|
Ensure the database has the given extension installed (e.g. the PostGIS extension). |
|
Escape identifiers for inclusion in SQL statements. |
|
Return the database name and currently active role of an SQLAlchemy connection. |