## 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
where: List[Union[str, List[str]]] = []
        params: List[Union[str, List[str]]] = []
        for key, value in self.data.items():
            if "attr__" in key:
                where.append("(attributes ->> 'attr__{}') = %s".format(key.split("attr__")[1]))
            else:
                if "__contains" in key:
                    where.append("{} @> %s::varchar(200)[]".format(key.replace("__contains", "")))
                else:
                    where.append("{} = %s".format(key))
            params.append(value)
        return {"where": where, "params": params}
class Selector(object):
    parts: List[SelectorPart] = []
    def __init__(self, selector: str, escape_slashes=True):
        self.parts = []
        
        selector = selector.replace("> * > ", "").replace("> *", "")
        tags = re.split(" ", selector.strip())
        tags.reverse()
        for index, tag in enumerate(tags):
            if tag == ">" or tag == "":
                continue
            direct_descendant = False
            if index > 0 and tags[index - 1] == ">":
                direct_descendant = True
            part = SelectorPart(tag, direct_descendant, escape_slashes)
            part.unique_order = len([p for p in self.parts if p.data == part.data])
            self.parts.append(copy.deepcopy(part))
class EventManager(models.QuerySet):