def schema_exists(cursor, schema_name):
    """
    Returns whether or not a schema exists in the DB given the schema name.
    """
    cursor.execute("""
        SELECT EXISTS (SELECT 1 FROM information_schema.schemata WHERE schema_name = %s)
    """, (schema_name,))
    return cursor.fetchone()[0]