title: Creating custom permission in data migration
body: <p>I was trying to create a custom permission in a migration, however after running migrate, the permission was not created in the permission table. Could someone point out what the error was? 
  Also I am not sure what I should use as the related model for ContentType as the permission is used for restricting users that can view a page which shows summary of users on the site. 
  Any help will be greatly appreciated, thanks.</p>
  
  <pre><code>def add_view_aggregated_data_permissions(apps, schema_editor):
      ContentType = apps.get_model('django', 'ContentType')
      Permission = apps.get_model('auth', 'Permission')
      content_type = ContentType.objects.get(app_label='auth', model='user')
      permission = Permission.objects.create(codename='can_view_data',
                                             name='Can view data',
                                             content_type=content_type)
  </code></pre>