zulip/zerver/migrations
Greg Price dc1eeef30a antispam: Make a setting for default Realm.max_invites.
This makes this value much easier for a server admin to change than it
was when embedded directly in the code.  (Note this entire mechanism
already only applies on a server open for anyone to create a realm.)

Doing this also means getting the default out of the database.
Instead, we make the column nullable, and when it's NULL in the
database, treat that as whatever the current default is.  This better
matches anyway the likely model where there are a few realms with
specially-set values, and everything else should be treated uniformly.

The migration contains a `RenameField` step, which sounds scary
operationally -- but it really does mean just the *field*, in
the model within the Python code.  The underlying column's name
doesn't change.
2018-03-16 18:00:11 -07:00
..
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 python: Sort imports in database migrations. 2017-11-15 15:44:00 -08: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 python: Sort imports in database migrations. 2017-11-15 15:44:00 -08: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 python: Sort imports in database migrations. 2017-11-15 15:44:00 -08: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 python: Sort imports in database migrations. 2017-11-15 15:44:00 -08: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 migration to correctly handle corner case. 2018-03-15 18:53:51 -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
__init__.py