2018-08-25 09:18:49 +02:00
|
|
|
# Generated by Django 1.11.14 on 2018-08-28 19:01
|
|
|
|
|
|
|
|
from django.db import migrations, models
|
2023-03-04 01:40:40 +01:00
|
|
|
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
|
2018-09-01 00:45:05 +02:00
|
|
|
from django.db.migrations.state import StateApps
|
2018-08-25 09:18:49 +02:00
|
|
|
|
2020-01-14 21:59:46 +01:00
|
|
|
|
2022-05-27 23:33:51 +02:00
|
|
|
def change_emojiset_choice(apps: StateApps, schema_editor: BaseDatabaseSchemaEditor) -> None:
|
2021-02-12 08:20:45 +01:00
|
|
|
UserProfile = apps.get_model("zerver", "UserProfile")
|
|
|
|
UserProfile.objects.filter(emojiset="google").update(emojiset="google-blob")
|
2018-08-25 09:18:49 +02:00
|
|
|
|
2021-02-12 08:19:30 +01:00
|
|
|
|
2018-08-25 09:18:49 +02:00
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
2021-02-12 08:20:45 +01:00
|
|
|
("zerver", "0188_userprofile_enable_login_emails"),
|
2018-08-25 09:18:49 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.AlterField(
|
2021-02-12 08:20:45 +01:00
|
|
|
model_name="userprofile",
|
|
|
|
name="emojiset",
|
2021-02-12 08:19:30 +01:00
|
|
|
field=models.CharField(
|
|
|
|
choices=[
|
2021-02-12 08:20:45 +01:00
|
|
|
("google", "Google modern"),
|
|
|
|
("google-blob", "Google classic"),
|
|
|
|
("twitter", "Twitter"),
|
|
|
|
("text", "Plain text"),
|
2021-02-12 08:19:30 +01:00
|
|
|
],
|
2021-02-12 08:20:45 +01:00
|
|
|
default="google-blob",
|
2021-02-12 08:19:30 +01:00
|
|
|
max_length=20,
|
|
|
|
),
|
2018-08-25 09:18:49 +02:00
|
|
|
),
|
2018-09-01 00:45:05 +02:00
|
|
|
migrations.RunPython(
|
2021-02-12 08:19:30 +01:00
|
|
|
change_emojiset_choice, reverse_code=migrations.RunPython.noop, elidable=True
|
|
|
|
),
|
2018-08-25 09:18:49 +02:00
|
|
|
]
|