title: Wagtail – Add an author to blogpost model
body: <p>I am trying to add an author field to my blogpost model to be referenced later in my HTML:</p>
  
  <pre><code>author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.PROTECT, default=None)
  </code></pre>
  
  <p>But the first time I tried to migrate I got this error:</p>
  
  <pre><code>(1452, 'Cannot add or update a child row: a foreign key constraint fails (`db`.`#sql-1_9a`, CONSTRAINT `blog_blogpage_author_id_8c179cec_fk_users_user_id` FOREIGN KEY (`author_id`) REFERENCES `users_user` (`id`))'
  </code></pre>
  
  <p>Which to me actually reads like what I want to archive, i.e. 'reference the user id'.
  When I run <code>makemigrations</code> again, this error shows:</p>
  
  <pre><code>(1060, "Duplicate column name 'author_id'")
  </code></pre>
  
  <p>Am I so far  off here? How to add an author field in Wagtail?</p>