def remove_keys(apps, schema_editor):
    """
    We can't import the Post model directly as it may be a newer
    version than this migration expects. We use the historical version.
    """
    Setting = apps.get_model('settings', 'Setting')
    try:
        key = 'USER_REGISTER_GIFT_BON_CREDITS'
        Setting.objects.get(key=key).delete()
    except Exception:
        pass
