docs: Remove manual flush memcached advice.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
This commit is contained in:
Bedo Khaled 2024-03-23 10:05:12 +02:00 committed by Tim Abbott
parent b42cd1022b
commit ed5e0fa141
2 changed files with 18 additions and 15 deletions

View File

@ -180,12 +180,17 @@ If you follow the processes described above, `tools/provision` and
migrations and run migrations on (`./manage.py migrate`) or rebuild migrations and run migrations on (`./manage.py migrate`) or rebuild
the relevant database automatically as appropriate. the relevant database automatically as appropriate.
While developing migrations, you may accidentally corrupt Notably, both `manage.py migrate` (`git grep post_migrate.connect` for
your databases while debugging your new code. details) and restarting `tools/run-dev` will flush `memcached`, so you
You can always rebuild these databases from scratch. shouldn't have to worry about cached objects from a previous database
schema.
Use `tools/rebuild-test-database` to rebuild the database While developing migrations, you may accidentally corrupt your
databases while debugging your new code. You can always rebuild these
databases from scratch:
- Use `tools/rebuild-test-database` to rebuild the database
used for `test-backend` and other automated tests. used for `test-backend` and other automated tests.
Use `tools/rebuild-dev-database` to rebuild the database - Use `tools/rebuild-dev-database` to rebuild the database
used in [manual testing](../development/using.md). used in [manual testing](../development/using.md).

View File

@ -83,14 +83,13 @@ following commands:
./manage.py migrate ./manage.py migrate
``` ```
You can read our It's highly recommended to read our
[database migration documentation](../subsystems/schema-migrations.md) [database migration documentation](../subsystems/schema-migrations.md)
to learn more about creating and applying database migrations. to learn more about creating and applying database migrations.
**Test your changes:** Once you've run the migration, flush memcached **Test your changes:** Once you've run the migration, [restart the
on your development server (`./scripts/setup/flush-memcached`) and then development
[restart the development server](../development/remote.md#running-the-development-server) server](../development/remote.md#running-the-development-server).
to avoid interacting with cached objects.
### Backend changes ### Backend changes
@ -262,9 +261,8 @@ Running migrations:
Applying zerver.NNNN_realm_mandatory_topics... OK Applying zerver.NNNN_realm_mandatory_topics... OK
``` ```
Once you've run the migration, flush memcached on your development Once you've run the migration, [restart the development
server (`./scripts/setup/flush-memcached`) and then [restart the development server](../development/remote.md#running-the-development-server) server](../development/remote.md#running-the-development-server).
to avoid interacting with cached objects.
### Handle database interactions ### Handle database interactions