A ForeignKey to `event.name`? `event.name` is not indexed and is not unique, so a foreign key reference to it is meaningless. `event.name` is part of a composite index where `profile_id` is first. Databases make composite indexes in the order in which columns are specified, so if you have two events with the same `name` (which is very often in production), your foreign key could end up pointing to the wrong place. What you need is this:

```python
event_id = db.Column(None, db.ForeignKey('event.id'), nullable=False)
event = db.relationship(Event, backref=db.backref('redirects', cascade='all, delete-orphan'))
```