Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
migrations: Enforce evaluation order in 0306 WHERE clause.
Anders Kaseorg69890f36b185
diff --git a/zerver/migrations/0306_custom_profile_field_date_format.py b/zerver/migrations/0306_custom_profile_field_date_format.pyindex 14fd87fbb84..db006cefcac 100644--- a/zerver/migrations/0306_custom_profile_field_date_format.py+++ b/zerver/migrations/0306_custom_profile_field_date_format.py@@ -20,7 +20,10 @@ class Migration(migrations.Migration):FROM zerver_customprofilefield AS fWHERE f.id = field_idAND f.field_type = 4- AND value <> to_char(to_date(value, 'YYYY-MM-DD'), 'YYYY-MM-DD');+ AND CASE+ WHEN f.field_type = 4+ THEN value <> to_char(to_date(value, 'YYYY-MM-DD'), 'YYYY-MM-DD')+ END;""",reverse_sql="",),