## Bug description
Hi, after upgrade from 1.23.1 to 1.24.0 we see in the migration this error
```
django.db.utils.NotSupportedError: cannot create index on partitioned table "posthog_event" concurrently
``` 

We have the events table partitioned using the inbuilt tool and apparently the migration does not handle that well. 

## Environment
Self-hosted instance running in Kubernetes using upstream docker images
posthog/models/event.py
return "\\".join([p.replace("\\", "") for p in class_name.split("\\\\")])
    def __init__(self, tag: str, direct_descendant: bool, escape_slashes: bool):
        self.direct_descendant = direct_descendant
        self.data: Dict[str, Union[str, List]] = {}
        self.ch_attributes: Dict[str, Union[str, List]] = {}  
        result = re.search(attribute_regex, tag)
        if result and "[id=" in tag:
            self.data["attr_id"] = result[3]
            self.ch_attributes["attr_id"] = result[3]
            tag = result[1]
        if result and "[" in tag:
            self.data["attributes__attr__{}".format(result[2])] = result[3]
            self.ch_attributes[result[2]] = result[3]
            tag = result[1]
        if "nth-child(" in tag:
            parts = tag.split(":nth-child(")
            self.data["nth_child"] = parts[1].replace(")", "")
            self.ch_attributes["nth-child"] = self.data["nth_child"]
            tag = parts[0]
        if "." in tag:
            parts = tag.split(".")
            
            self.data["attr_class__contains"] = [self._unescape_class(p) if escape_slashes else p for p in parts[1:]]
            tag = parts[0]
        if tag:
            self.data["tag_name"] = tag
    @property
    def extra_query(self) -> Dict[str, List[Union[str, List[str]]]]: