#NEWLINE# def forwards( self , orm ) : #NEWLINE# #INDENT# '\n        This migration has been customized to support upgrades from Cloudera\n        Enterprise 3.5, as well as Hue 1.2\n        ' #NEWLINE# if ( 'userman_ldapgroup' in connection . introspection . table_names ( ) ) : #NEWLINE# #INDENT# db . rename_table ( 'userman_ldapgroup' , 'useradmin_ldapgroup' ) #NEWLINE# db . delete_column ( 'useradmin_ldapgroup' , 'hidden' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# 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 ) ) ) ) #NEWLINE# db . send_create_signal ( 'useradmin' , [ 'LdapGroup' ] ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# db . add_column ( 'useradmin_userprofile' , 'creation_method' , self . gf ( 'django.db.models.fields.CharField' ) ( max_length = 64 , default = str ( UserProfile . CreationMethod . HUE ) ) , keep_default = False ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# for user in User . objects . all ( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# orm . UserProfile . objects . get ( user = user ) #NEWLINE# #UNINDENT# except orm . UserProfile . DoesNotExist : #NEWLINE# #INDENT# create_profile_for_user ( user )