zulip/zephyr/migrations
Zev Benjamin 88937655fd [manual] Add a ts_vector cache column on zephyr_message along with the appropriate trigger and index
This needs to be done in three South migrations to not block users
from sending messages for a long time.  Adding the column requires a
write lock on the zephyr_message table and populating the new column
takes a long time.  Thus, we can't do them both in the same
transaction (which South forces on migrations).  Additionally,
creating the index takes a lot of computation and needs to lock the
table when not done CONCURRENTLY, which can't be done inside of a
transaction.

To do this manual change, you need to run:
    python manage.py migrate zephyr 0007
    ssh postgres.humbughq.com 'echo "CREATE INDEX CONCURRENTLY zephyr_message_search_tsvector ON zephyr_message USING gin(search_tsvector);" | psql'
    python manage.py migrate zephyr 0008

on staging. No action is required on prod since the database is
shared.

Note that this migration must be done completely before we switch to
using the tsvector cache column.

(imported from commit b6a27013a60c1fd196eabb095d2d11d20bba5aac)
2013-02-06 12:09:49 -05:00
..
0001_initial.py Include autogenerated initial migrations for South. 2013-01-08 18:14:39 -05:00
0002_auto__add_field_preregistrationuser_referred_by__add_field_preregistra.py [south] Migration for PreregistrationUser 2013-01-14 10:25:26 -05:00
0003_auto__add_field_stream_invite_only.py [schema][manual] Add schema invite_only flag for streams 2013-01-24 17:34:21 -05:00
0004_add_postgres_zephyr_message_full_text_idx.py [manual] Add South migration for creating a Postgres full text index of messages 2013-01-31 15:57:45 -05:00
0005_auto__add_field_subscription_in_home_view.py [manual] South migration for Subscriptions model change. 2013-02-05 15:34:35 -05:00
0006_add_zephyr_message_search_tsvector.py [manual] Add a ts_vector cache column on zephyr_message along with the appropriate trigger and index 2013-02-06 12:09:49 -05:00
0007_populate_zephyr_message_search_tsvector.py [manual] Add a ts_vector cache column on zephyr_message along with the appropriate trigger and index 2013-02-06 12:09:49 -05:00
0008_index_zephyr_message_search_tsvector.py [manual] Add a ts_vector cache column on zephyr_message along with the appropriate trigger and index 2013-02-06 12:09:49 -05:00
__init__.py Include autogenerated initial migrations for South. 2013-01-08 18:14:39 -05:00