## 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
if not self.team_id in LAST_UPDATED_TEAM_ACTION:
            return False
        if not self.team_id in TEAM_EVENT_ACTION_QUERY_CACHE:
            return False
        if not self.event in TEAM_EVENT_ACTION_QUERY_CACHE[self.team_id]:
            return False
        if not self.team_id in TEAM_ACTION_QUERY_CACHE:
            return False
        
        if last_updated_action_ts > LAST_UPDATED_TEAM_ACTION[self.team_id]:
            return False
        return True
    @property
    def person(self):
        return Person.objects.get(
            team_id=self.team_id, persondistinctid__team_id=self.team_id, persondistinctid__distinct_id=self.distinct_id
        )
    
    
    
    
    @property
    def actions(self) -> List:
        last_updated_action_ts = Action.objects.filter(team_id=self.team_id).aggregate(models.Max("updated_at"))[
            "updated_at__max"
        ]