def METHOD_NAME(self, orm):
    """
    This migration has been customized to support upgrades from Cloudera
    Enterprise 3.5, as well as Hue 1.2
    """
    if 'userman_ldapgroup' in connection.introspection.table_names():
      db.rename_table('userman_ldapgroup', 'useradmin_ldapgroup')
      db.delete_column('useradmin_ldapgroup', 'hidden')
    else:
      # Adding model 'LdapGroup'
      db.create_table('useradmin_ldapgroup', (
          ('group', self.gf('django.db.models.fields.related.ForeignKey')(related_name='group', to=orm['auth.Group'])),
          ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
      ))
      db.send_create_signal('useradmin', ['LdapGroup'])
    # Adding field 'UserProfile.creation_method'
    try:
      db.add_column('useradmin_userprofile', 'creation_method', self.gf('django.db.models.fields.CharField')(max_length=64, default=UserProfile.CreationMethod.HUE.name), keep_default=False)
    except Exception:
      # It's possible that we could run into an error here, because this
      # table may have been migrated from Cloudera Enterprise, in which case
      # this column would already exist.
      pass
    for user in User.objects.all():
      try:
        orm.UserProfile.objects.get(user=user)
      except orm.UserProfile.DoesNotExist:
        create_profile_for_user(user)