In the previous commit 5222247 we added a topic_id column to EmailLog. This simply backfills it in batches. The next PR will get rid of the topic method defined on EmailLog in favour of belongs_to.