diff --git a/zerver/lib/export.py b/zerver/lib/export.py index d7359ef20d..dddd426bf8 100644 --- a/zerver/lib/export.py +++ b/zerver/lib/export.py @@ -58,7 +58,7 @@ ALL_ZERVER_TABLES = [ 'zerver_attachment_messages', 'zerver_client', 'zerver_customprofilefield', - 'zerver_customprofilefield_value', + 'zerver_customprofilefieldvalue', 'zerver_defaultstream', 'zerver_huddle', 'zerver_message', @@ -451,7 +451,7 @@ def get_realm_config() -> Config: ) Config( - table='zerver_customprofilefield_value', + table='zerver_customprofilefieldvalue', model=CustomProfileFieldValue, normal_parent=user_profile_config, parent_key='user_profile__in', diff --git a/zerver/lib/import_realm.py b/zerver/lib/import_realm.py index 4809d77be8..65d31a5123 100644 --- a/zerver/lib/import_realm.py +++ b/zerver/lib/import_realm.py @@ -56,7 +56,7 @@ id_maps = { 'useractivityinterval': {}, 'usermessage': {}, 'customprofilefield': {}, - 'customprofilefield_value': {}, + 'customprofilefieldvalue': {}, 'attachment': {}, } # type: Dict[str, Dict[int, int]] @@ -528,13 +528,13 @@ def do_import_realm(import_dir: Path, subdomain: str) -> Realm: related_table="customprofilefield") bulk_import_model(data, CustomProfileField, 'zerver_customprofilefield') - re_map_foreign_keys(data, 'zerver_customprofilefield_value', 'user_profile', + re_map_foreign_keys(data, 'zerver_customprofilefieldvalue', 'user_profile', related_table="user_profile") - re_map_foreign_keys(data, 'zerver_customprofilefield_value', 'field', + re_map_foreign_keys(data, 'zerver_customprofilefieldvalue', 'field', related_table="customprofilefield") - update_model_ids(CustomProfileFieldValue, data, 'zerver_customprofilefield_value', - related_table="customprofilefield_value") - bulk_import_model(data, CustomProfileFieldValue, 'zerver_customprofilefield_value') + update_model_ids(CustomProfileFieldValue, data, 'zerver_customprofilefieldvalue', + related_table="customprofilefieldvalue") + bulk_import_model(data, CustomProfileFieldValue, 'zerver_customprofilefieldvalue') # Import uploaded files and avatars import_uploads(os.path.join(import_dir, "avatars"), processing_avatars=True) diff --git a/zerver/lib/slack_data_to_zulip_data.py b/zerver/lib/slack_data_to_zulip_data.py index 5834112024..b9f2343019 100755 --- a/zerver/lib/slack_data_to_zulip_data.py +++ b/zerver/lib/slack_data_to_zulip_data.py @@ -89,7 +89,7 @@ def slack_workspace_to_realm(domain_name: str, realm_id: int, user_list: List[Ze # Custom profile fields realm['zerver_customprofilefield'] = zerver_customprofilefield - realm['zerver_customprofilefield_value'] = zerver_customprofilefield_value + realm['zerver_customprofilefieldvalue'] = zerver_customprofilefield_value realm['zerver_defaultstream'] = channels_to_zerver_stream_fields[0] realm['zerver_stream'] = channels_to_zerver_stream_fields[1]