mirror of https://github.com/zulip/zulip.git
50c3dd88e6
Migrate all `ids` of anything which does not have a foreign key from the Message or UserMessage table (and would thus require walking those) to be `bigint`. This is done by removing explicit `BigAutoField`s, trading them for explicit `AutoField`s on the tables to not be migrated, while updating `DEFAULT_AUTO_FIELD` to the new default. In general, the tables adjusted in this commit are small tables -- at least compared to Messages and UserMessages. Many-to-many tables without their own model class are adjusted by a custom Operation, since they do not automatically pick up migrations when `DEFAULT_AUTO_FIELD` changes[^1]. Note that this does multiple scans over tables to update foreign keys[^2]. Large installs may wish to hand-optimize this using the output of `./manage.py sqlmigrate` to join multiple `ALTER TABLE` statements into one, to speed up the migration. This is unfortunately not possible to do generically, as constraint names may differ between installations. This leaves the following primary keys as non-`bigint`: - `auth_group.id` - `auth_group_permissions.id` - `auth_permission.id` - `django_content_type.id` - `django_migrations.id` - `otp_static_staticdevice.id` - `otp_static_statictoken.id` - `otp_totp_totpdevice.id` - `two_factor_phonedevice.id` - `zerver_archivedmessage.id` - `zerver_client.id` - `zerver_message.id` - `zerver_realm.id` - `zerver_recipient.id` - `zerver_userprofile.id` [^1]: https://code.djangoproject.com/ticket/32674 [^2]: https://code.djangoproject.com/ticket/24203 |
||
---|---|---|
.. | ||
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 | ||
0029_update_remoterealm_indexes.py | ||
0030_alter_remoteinstallationcount_remote_id.py | ||
0031_alter_remoteinstallationcount_remote_id_and_more.py | ||
0032_remotepushdevicetoken_backfill_ios_app_id.py | ||
0033_remoterealm.py | ||
0034_remoterealmauditlog_remote_realm_and_more.py | ||
0035_remoterealmcount_remote_realm_and_more.py | ||
0036_remotezulipserver_last_version.py | ||
0037_alter_remoteinstallationcount_unique_together_and_more.py | ||
0038_unique_server_remote_id.py | ||
0039_remoterealm_org_type.py | ||
0040_remoterealm_authentication_methods_remoterealm_name.py | ||
0041_remotezulipserver_org_type.py | ||
0042_alter_remoterealmauditlog_realm_id.py | ||
0043_remotepushdevicetoken_remote_realm.py | ||
0044_remoterealmbillinguser.py | ||
0045_remoterealmauditlog_zilencer_remoterealmauditlog_server_realm_and_more.py | ||
0046_remotezulipserver_last_audit_log_update.py | ||
0047_preregistrationremoteserverbillinguser_and_more.py | ||
0048_remotezulipserver_last_api_feature_level.py | ||
0049_alter_remoterealmbillinguser_unique_together_and_more.py | ||
0050_preregistrationremoterealmbillinguser_created_user_and_more.py | ||
0051_remoterealm_is_system_bot_realm.py | ||
0052_alter_remoterealm_plan_type_and_more.py | ||
0053_remoterealmauditlog_acting_remote_user_and_more.py | ||
0054_remoterealmbillinguser_enable_maintenance_release_emails_and_more.py | ||
0055_remoteserverbillinguser_tos_version.py | ||
0056_remoterealm_realm_locally_deleted.py | ||
0057_remoterealm_last_request_timestamp_and_more.py | ||
0058_remoteinstallationcount_add_mobile_pushes_forwarded_index.py | ||
0059_remoterealmauditlog_add_synced_billing_event_type_index.py | ||
0060_remove_remoterealmcount_unique_remote_realm_installation_count_and_more.py | ||
0061_clean_count_tables.py | ||
0062_alter_remoteinstallationcount_id_and_more.py | ||
0063_convert_ids_to_bigints.py | ||
__init__.py |