def add_user_preferences(apps, schema_editor):
    """ add UserPreference entry for each existing user """
    User = apps.get_model('auth', 'User')
    UserPreference = apps.get_model('userextensions', 'UserPreference')
    for user in User.objects.all():
        UserPreference.objects.create(user=user)
