def verify_db_ownership(conn):
    'Function used to check whether DB ownership matches what we expect.'
    logger = logging.getLogger('dirbs.db')
    if (query_db_ownership(conn) != 'dirbs_core_power_user'):
        logger.error('Database is not owned by the dirbs_core_power_user group! Please the following as the current DB owner (whilst logged into the database):\n\tALTER DATABASE <database> OWNER TO dirbs_core_power_user;')
        raise DatabaseSchemaException('Incorrect database ownership!')
Function used to check whether DB ownership matches what we expect.
def verify_db_ownership(conn):
    
    logger = logging.getLogger('dirbs.db')
    if (query_db_ownership(conn) != 'dirbs_core_power_user'):
        logger.error('Database is not owned by the dirbs_core_power_user group! Please the following as the current DB owner (whilst logged into the database):\n\tALTER DATABASE <database> OWNER TO dirbs_core_power_user;')
        raise DatabaseSchemaException('Incorrect database ownership!')