zulip/zerver/migrations
Joshua Pan 533eccd655 models: Create delivery_email field in userprofile.
This commit creates a new field called delivery_email. For now, it is
exactly the same as email upon user profile creation and should stay
that way even when email is changed, and is used only for sending
outgoing email from Zulip.

The purpose of this field is to support an upcoming option where the
existing `email` field in Zulip becomes effectively the user's
"display email" address, as part of making it possible for users
actual email addresses (that can receive email, stored in the
delivery_email field) to not be available to other non-administrator
users in the organization.

Because the `email` field is used in numerous places in display code,
in the API, and in database queries, the shortest path to implementing
this "private email" feature is to keep "email" as-is in those parts
of the codebase, and just set the existing "email" ("display email")
model field to be something generated like
"username@zulip.example.com" for display purposes.

Eventually, we'll want to do further refactoring, either in the form
of having both `display_email` and `delivery_email` as fields, or
renaming "email" to "username".
2018-07-12 12:30:20 +05:30
..
0001_initial.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0029_realm_subdomain.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0030_realm_org_type.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0031_remove_system_avatar_source.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0032_verify_all_medium_avatar_images.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0033_migrate_domain_to_realmalias.py zerver/migrations: Use python 3 syntax for typing. 2017-10-26 15:24:56 -07:00
0034_userprofile_enable_online_push_notifications.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0035_realm_message_retention_period_days.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0036_rename_subdomain_to_string_id.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0037_disallow_null_string_id.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0038_realm_change_to_community_defaults.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0039_realmalias_drop_uniqueness.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0040_realm_authentication_methods.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0041_create_attachments_for_old_messages.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0042_attachment_file_name_length.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0043_realm_filter_validators.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0044_reaction.py models: Remove unused ModelReprMixin class. 2018-05-15 19:11:22 -07:00
0045_realm_waiting_period_threshold.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0046_realmemoji_author.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0047_realm_add_emoji_by_admins_only.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0048_enter_sends_default_to_false.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0049_userprofile_pm_content_in_desktop_notifications.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0050_userprofile_avatar_version.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0051_realmalias_add_allow_subdomains.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0052_auto_fix_realmalias_realm_nullable.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0053_emailchangestatus.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0054_realm_icon.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0055_attachment_size.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0056_userprofile_emoji_alt_code.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0057_realmauditlog.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0058_realm_email_changes_disabled.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0059_userprofile_quota.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0060_move_avatars_to_be_uid_based.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0061_userprofile_timezone.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0062_default_timezone.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0063_realm_description.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0064_sync_uploads_filesize_with_db.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0065_realm_inline_image_preview.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0066_realm_inline_url_embed_preview.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0067_archived_models.py models: Remove unused ModelReprMixin class. 2018-05-15 19:11:22 -07:00
0068_remove_realm_domain.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0069_realmauditlog_extra_data.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0070_userhotspot.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0071_rename_realmalias_to_realmdomain.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0072_realmauditlog_add_index_event_time.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0073_custom_profile_fields.py i18n: Add missing strings for custom profile fields and fix capitalization. 2018-05-06 19:44:36 -07:00
0074_fix_duplicate_attachments.py zerver/migrations: Use python 3 syntax for typing. 2017-10-26 15:24:56 -07:00
0075_attachment_path_id_unique.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0076_userprofile_emojiset.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0077_add_file_name_field_to_realm_emoji.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0078_service.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0079_remove_old_scheduled_jobs.py zerver/migrations: Use python 3 syntax for typing. 2017-10-26 15:24:56 -07:00
0080_realm_description_length.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0081_make_emoji_lowercase.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0082_index_starred_user_messages.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0083_index_mentioned_user_messages.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0084_realmemoji_deactivated.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0085_fix_bots_with_none_bot_type.py zerver/migrations: Use python 3 syntax for typing. 2017-10-26 15:24:56 -07:00
0086_realm_alter_default_org_type.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0087_remove_old_scheduled_jobs.py zerver/migrations: Use python 3 syntax for typing. 2017-10-26 15:24:56 -07:00
0088_remove_referral_and_invites.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0089_auto_20170710_1353.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0090_userprofile_high_contrast_mode.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0091_realm_allow_edit_history.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0092_create_scheduledemail.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0093_subscription_event_log_backfill.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0094_realm_filter_url_validator.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0095_index_unread_user_messages.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0096_add_password_required.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0097_reactions_emoji_code.py migrations: Fix text version to Custom Emoji. 2018-03-16 17:16:18 -07:00
0098_index_has_alert_word_user_messages.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0099_index_wildcard_mentioned_user_messages.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0100_usermessage_remove_is_me_message.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0101_muted_topic.py models: Remove unused ModelReprMixin class. 2018-05-15 19:11:22 -07:00
0102_convert_muted_topic.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0103_remove_userprofile_muted_topics.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0104_fix_unreads.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0105_userprofile_enable_stream_push_notifications.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0106_subscription_push_notifications.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0107_multiuseinvite.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0108_fix_default_string_id.py zerver/migrations: Use python 3 syntax for typing. 2017-10-26 15:24:56 -07:00
0109_mark_tutorial_status_finished.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0110_stream_is_in_zephyr_realm.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0111_botuserstatedata.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0112_index_muted_topics.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0113_default_stream_group.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0114_preregistrationuser_invited_as_admin.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0115_user_groups.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0116_realm_allow_message_deleting.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0117_add_desc_to_user_group.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0118_defaultstreamgroup_description.py python: Sort imports in database migrations. 2017-11-15 15:44:00 -08:00
0119_userprofile_night_mode.py settings: Add backend storage and interface for night mode. 2017-11-15 16:36:06 -08:00
0120_botuserconfigdata.py migrations: Fix conflict. 2017-11-17 08:24:56 -08:00
0121_realm_signup_notifications_stream.py models: Add signup_notifications_stream attribute to Realm. 2017-11-21 17:39:50 -08:00
0122_rename_botuserstatedata_botstoragedata.py embedded bots: Consistently use 'storage' instead of 'state.' 2017-11-27 21:05:34 -08:00
0123_userprofile_make_realm_email_pair_unique.py auth: Allow accounts with the same email in different realms. 2017-11-28 16:23:10 -08:00
0124_stream_enable_notifications.py notification settings: Add stream email notifications setting. 2017-11-28 17:51:18 -08:00
0125_realm_max_invites.py invitations: Limit realms to 100 invites per day. 2017-11-29 22:18:05 -08:00
0126_prereg_remove_users_without_realm.py registration: Enforce realm is None only if realm_creation. 2017-12-11 18:36:14 -08:00
0127_disallow_chars_in_stream_and_user_name.py migrations: Fix mypy error in placeholder migration. 2018-02-05 18:03:07 -08:00
0128_scheduledemail_realm.py models: Add ScheduledEmail.realm. 2017-12-19 17:46:36 -08:00
0129_remove_userprofile_autoscroll_forever.py settings: Remove autoscroll_forever setting. 2018-01-02 10:35:49 -05:00
0130_text_choice_in_emojiset.py migrations: Add reverser for emoji_alt_code migration. 2018-02-05 16:55:21 -08:00
0131_realm_create_generic_bot_by_admins_only.py settings: Limit the creation of generic bots. 2018-01-02 18:12:22 -05:00
0132_realm_message_visibility_limit.py models: Add message_visibility_limit attribute to Realm. 2018-01-04 08:52:40 -05:00
0133_rename_botuserconfigdata_botconfigdata.py Rename BotUserConfigData to BotConfigData. 2018-01-06 14:13:18 -05:00
0134_scheduledmessage.py scheduledmessages: Add model for the ScheduledMessage table. 2018-01-10 09:18:02 -05:00
0135_scheduledmessage_delivery_type.py scheduledmessages: Add delivery_type field to the table. 2018-01-19 11:33:11 -05:00
0136_remove_userprofile_quota.py upload: Remove UserProfile field for old per-user quota. 2018-01-29 16:06:11 -08:00
0137_realm_upload_quota_gb.py upload: Add a quota field to Realm. 2018-01-29 16:06:11 -08:00
0138_userprofile_realm_name_in_notifications.py settings: Added setting to turn on and off realm name in email subject. 2018-02-05 18:01:54 -08:00
0139_fill_last_message_id_in_subscription_logs.py RealmAuditLog: Fill subscription events with event_last_message_id=None. 2018-02-22 09:45:22 -08:00
0140_realm_send_welcome_emails.py org-settings: Add setting to turn off welcome emails. 2018-02-28 12:39:01 -08:00
0141_change_usergroup_description_to_textfield.py models: Change description attribute of user group to textfield. 2018-03-01 11:27:26 -08:00
0142_userprofile_translate_emoticons.py emoji: Add support for translating emoticons. 2018-03-04 15:37:24 -08:00
0143_realm_bot_creation_policy.py org settings: Add setting to prevent users from adding bots. 2018-03-09 13:21:55 -08:00
0144_remove_realm_create_generic_bot_by_admins_only.py org settings: Add setting to prevent users from adding bots. 2018-03-09 13:21:55 -08:00
0145_reactions_realm_emoji_name_to_id.py reactions: Fix buggy migration for realm emoji. 2018-03-20 21:50:47 -07:00
0146_userprofile_message_content_in_email_notifications.py settings: Add setting to disable message content in missed message emails. 2018-03-09 21:16:02 -08:00
0147_realm_disallow_disposable_email_addresses.py emails: Add backend for disallowing disposable email addresses. 2018-03-11 22:05:58 -07:00
0148_max_invites_forget_default.py antispam: Make a setting for default Realm.max_invites. 2018-03-16 18:00:11 -07:00
0149_realm_emoji_drop_unique_constraint.py migrations: Fix 0149_realm_emoji migration for S3 case. 2018-03-23 10:48:50 -07:00
0150_realm_allow_community_topic_editing.py models: Add allow_community_topic_editing setting. 2018-03-22 16:02:24 -07:00
0151_last_reminder_default_none.py models: Fix default value for last_reminder. 2018-03-29 11:53:12 -07:00
0152_realm_default_twenty_four_hour_time.py org settings: Add realm level default time format setting. 2018-03-31 16:23:26 -07:00
0153_remove_int_float_custom_fields.py i18n: Add missing strings for custom profile fields and fix capitalization. 2018-05-06 19:44:36 -07:00
0154_fix_invalid_bot_owner.py bots: Clean up editing bots impacting non-bot users. 2018-04-02 18:58:26 -07:00
0155_change_default_realm_description.py org settings: Change default realm description to empty string. 2018-04-06 15:15:47 -07:00
0156_add_hint_to_profile_field.py profile: Add hint attribute to custom profile fields. 2018-04-19 11:32:35 -07:00
0157_userprofile_is_guest.py guest: Add a model field for guest users. 2018-04-20 16:08:29 -07:00
0158_realm_video_chat_provider.py models: Add attribute for video provider in realm. 2018-04-23 09:15:12 -07:00
0159_realm_google_hangouts_domain.py settings: Add support for Hangouts as the video chat provider. 2018-04-23 09:39:47 -07:00
0160_add_choice_field.py i18n: Add missing strings for custom profile fields and fix capitalization. 2018-05-06 19:44:36 -07:00
0161_realm_message_content_delete_limit_seconds.py org setting: Add time limits for message deleting. 2018-04-27 19:22:28 -07:00
0162_change_default_community_topic_editing.py org settings: Change default allow_community_topic_editing value. 2018-04-28 13:00:29 -07:00
0163_remove_userprofile_default_desktop_notifications.py settings: Remove obsolete default_desktop_notifications setting. 2018-04-28 13:46:07 -07:00
0164_stream_history_public_to_subscribers.py migrations: Remove dependence on PRIVATE_STREAM_HISTORY_FOR_SUBSCRIBERS. 2018-05-29 07:36:53 -07:00
0165_add_date_to_profile_field.py i18n: Add missing strings for custom profile fields and fix capitalization. 2018-05-06 19:44:36 -07:00
0166_add_url_to_profile_field.py i18n: Add missing strings for custom profile fields and fix capitalization. 2018-05-06 19:44:36 -07:00
0167_custom_profile_fields_sort_order.py migrations: Add missing reverse_code for migration 0167. 2018-05-21 09:42:19 -07:00
0168_stream_is_web_public.py web_public_streams: Add is_web_public to Stream table. 2018-05-02 15:23:33 -07:00
0169_stream_is_announcement_only.py models: Add field is_announcement_only to stream. 2018-05-13 09:06:20 -07:00
0170_submessage.py Add SubMessage table. 2018-05-16 15:13:33 -07:00
0171_userprofile_dense_mode.py settings: Add a development-only setting for less dense mode. 2018-05-24 12:31:37 -07:00
0172_add_user_type_of_custom_profile_field.py custom fields: Add user type of custom fields. 2018-05-27 23:01:21 -07:00
0173_support_seat_based_plans.py billing: Add initial support for seat based plans. 2018-07-09 14:33:08 +05:30
0174_userprofile_delivery_email.py models: Create delivery_email field in userprofile. 2018-07-12 12:30:20 +05:30
__init__.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00