Please replace the calls to toUpperCase() with SchemaUtil.normalizeIdentifier(name) instead, as this allows the name to be put in double quotes to make it case sensitive.