mirror of https://github.com/zulip/zulip.git
30495cec58
This migration applies under the assumption that extra_data_json has been populated for all existing and coming audit log entries. - This removes the manual conversions back and forth for extra_data throughout the codebase including the orjson.loads(), orjson.dumps(), and str() calls. - The custom handler used for converting Decimal is removed since DjangoJSONEncoder handles that for extra_data. - We remove None-checks for extra_data because it is now no longer nullable. - Meanwhile, we want the bouncer to support processing RealmAuditLog entries for remote servers before and after the JSONField migration on extra_data. - Since now extra_data should always be a dict for the newer remote server, which is now migrated, the test cases are updated to create RealmAuditLog objects by passing a dict for extra_data before sending over the analytics data. Note that while JSONField allows for non-dict values, a proper remote server always passes a dict for extra_data. - We still test out the legacy extra_data format because not all remote servers have migrated to use JSONField extra_data. This verifies that support for extra_data being a string or None has not been dropped. Co-authored-by: Siddharth Asthana <siddharthasthana31@gmail.com> Signed-off-by: Zixuan James Li <p359101898@gmail.com> |
||
---|---|---|
.. | ||
0001_initial.py | ||
0002_remote_zulip_server.py | ||
0003_add_default_for_remotezulipserver_last_updated_field.py | ||
0004_remove_deployment_model.py | ||
0005_remotepushdevicetoken_fix_uniqueness.py | ||
0006_customer.py | ||
0007_remotezulipserver_fix_uniqueness.py | ||
0008_customer_billing_user.py | ||
0009_plan.py | ||
0010_billingprocessor.py | ||
0011_customer_has_billing_relationship.py | ||
0012_coupon.py | ||
0013_remove_customer_billing_user.py | ||
0014_cleanup_pushdevicetoken.py | ||
0015_delete_billing.py | ||
0016_remote_counts.py | ||
0017_installationcount_indexes.py | ||
0018_remoterealmauditlog.py | ||
0019_remotezulipserver_plan_type.py | ||
0020_remotezulipserverauditlog.py | ||
0021_alter_remotezulipserver_uuid.py | ||
0022_remotezulipserver_create_audit_log_backfill.py | ||
0023_remotezulipserver_deactivated.py | ||
0024_remotepushdevicetoken_user_uuid.py | ||
0025_alter_remotepushdevicetoken_user_id_drop_index.py | ||
0026_auditlog_models_extra_data_json.py | ||
0027_backfill_remote_realmauditlog_extradata_to_json_field.py | ||
0028_rename_extradatajson_remoteauditlog_extra_data.py | ||
__init__.py |