zulip/zerver/management/commands
Shubham Padia bf6dc4472b models: Add is_private flag to UserMessage and add index for it.
The is_private flag is intended to be set if recipient type is
'private'(1) or 'huddle'(3), otherwise i.e if it is 'stream'(2), it
should be unset.

This commit adds a database index for the is_private flag (which we'll
need to use it). That index is used to reset the flag if it was
already set. The already set flags were due to a previous removal of
is_me_message flag for which the values were not cleared out.

For now, the is_private flag is always 0 since the really hard part of
this migration is clearing the unspecified previous state; future
commits will fully implement it actually doing something.

History: Migration rewritten significantly by tabbott to ensure it
runs in only 3 minutes on chat.zulip.org.  A key detail in making that
work was to ensure that we use the new index for the queries to find
rows to update (which currently requires the `order_by` and `limit`
clauses).
2018-07-30 15:43:55 -07:00
..
__init__.py
add_users_to_mailing_list.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
add_users_to_streams.py refactoring: Replaced occurences of create_stream_if_needed. 2018-03-21 16:47:36 -07:00
bankrupt_users.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
bulk_change_user_name.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
change_user_email.py zerver/management: Remove unused imports (F401). 2017-11-07 16:36:54 -08:00
check_redis.py mypy: Enable strict optional for check redis management command 2018-05-17 13:44:35 -07:00
checkconfig.py management: Refactor checkconfig code to live in library. 2018-05-03 21:11:02 -07:00
compilemessages.py Enable pycodestyle W605 (invalid escape sequence). 2018-07-03 16:54:46 +02:00
convert_gitter_data.py gitter import: Add management command. 2018-07-23 08:36:30 -07:00
convert_slack_data.py slack import: Implement threading as a management command. 2018-04-15 19:53:02 +05:30
create_default_stream_groups.py refactoring: Replaced occurences of create_stream_if_needed. 2018-03-21 16:47:36 -07:00
create_large_indexes.py models: Add is_private flag to UserMessage and add index for it. 2018-07-30 15:43:55 -07:00
create_realm_internal_bots.py create_realm_internal_bots: Refactor to extract main op as a function. 2018-05-23 11:53:22 +05:30
create_stream.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
create_user.py mypy: Raise in commands/create_user.py if initial_password returns None. 2018-03-25 08:59:08 -07:00
deactivate_realm.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
deactivate_user.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
delete_old_unclaimed_attachments.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
deliver_email.py logging: Reduce `create_logger` to new `log_to_file`. 2017-12-12 17:17:08 -08:00
deliver_scheduled_messages.py reminders: Add various design improvements for the UI/reminder msg. 2018-05-21 09:07:37 -07:00
dump_messages.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
email_mirror.py mypy: Remove some now-unnecessary type: ignores. 2018-03-28 10:39:05 -07:00
enqueue_digest_emails.py logging: Reduce `create_logger` to new `log_to_file`. 2017-12-12 17:17:08 -08:00
enqueue_file.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
export.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
export_single_user.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
export_usermessage_batch.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
fill_memcached_caches.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
fix_unreads.py zerver/management: Change use of typing.Text to str. 2018-05-10 14:19:49 -07:00
generate_invite_links.py models: Make email_allowed_for_realm raise exception. 2018-03-15 14:35:24 -07:00
generate_multiuse_invite_link.py zerver/management: Change use of typing.Text to str. 2018-05-10 14:19:49 -07:00
generate_realm_creation_link.py confirmation: Presume email valid when admin creates realm. 2018-02-05 12:59:12 -08:00
get_migration_status.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
import.py import: Clean up the management command. 2018-05-28 11:54:04 -07:00
initialize_voyager_db.py initialize_voyager_db: Do nothing if a realm already exists. 2018-05-17 11:38:09 -07:00
knight.py zerver: Require permissions be acceptable to do_change_is_admin. 2018-05-15 11:25:47 -07:00
list_realms.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
logout_all_users.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
makemessages.py Enable pycodestyle W605 (invalid escape sequence). 2018-07-03 16:54:46 +02:00
merge_streams.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
print_email_delivery_backlog.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
process_queue.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
purge_queue.py purge_queue: Allow purging Tornado-consumed queues. 2017-11-29 14:44:53 -08:00
query_ldap.py query_ldap: Print the email address for configuration (C). 2018-05-31 13:47:26 -07:00
rate_limit.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
reactivate_realm.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
realm_domain.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
realm_filters.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
register_server.py register_server: Fix recommendation to run with python 2. 2018-05-20 13:16:33 -07:00
remove_users_from_stream.py zerver/management: Remove unused imports (F401). 2017-11-07 16:36:54 -08:00
rename_stream.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
runtornado.py tornado: Import autoreload module from upstream Tornado. 2018-05-20 16:49:17 -07:00
send_password_reset_email.py zerver/management: Change use of typing.Text to str. 2018-05-10 14:19:49 -07:00
send_stats.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
send_test_email.py management: Use tokenized no-reply address in send_test_email. 2018-06-23 12:03:30 -07:00
send_webhook_fixture_message.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
set_default_streams.py zerver/management: Change use of typing.Text to str. 2018-05-10 14:19:49 -07:00
set_message_flags.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
show_admins.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
show_unreads.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
soft_deactivate_users.py python: Sort imports in management commands. 2017-11-15 15:43:47 -08:00
sync_ldap_user_data.py logging: Reduce `create_logger` to new `log_to_file`. 2017-12-12 17:17:08 -08:00
turn_off_digests.py zerver/management: Remove unused imports (F401). 2017-11-07 16:36:54 -08:00