@@ -0,0 +1,1065 @@
+from django.db import migrations%0Afrom django.db.backends.postgresql.schema import BaseDatabaseSchemaEditor%0Afrom django.db.migrations.state import StateApps%0A%0A%0Adef update_deprecated_emoji_style(apps: StateApps, schema_editor: BaseDatabaseSchemaEditor) -%3E None:%0A    %22%22%22%0A    This migration updates the emoji style for users who are using the%0A    deprecated Google blob style. Unless they are part of an organization%0A    which has Google blob as an organization default, these users will%0A    now use the modern Google emoji style.%0A    %22%22%22%0A%0A    UserProfile = apps.get_model(%22zerver%22, %22UserProfile%22)%0A    RealmUserDefault = apps.get_model(%22zerver%22, %22RealmUserDefault%22)%0A%0A    UserProfile.objects.filter(emojiset=%22google-blob%22).exclude(%0A        realm__in=RealmUserDefault.objects.filter(emojiset=%22google-blob%22).values(%22realm%22)%0A    ).update(emojiset=%22google%22)%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A    dependencies = %5B%0A        (%22zerver%22, %220415_delete_scimclient%22),%0A    %5D%0A%0A    operations = %5B%0A        migrations.RunPython(update_deprecated_emoji_style, elidable=True),%0A    %5D%0A

Switch users with blob emoji to use Google style.