From ed5e0fa1412e187b503f4b9ade6e82904583d484 Mon Sep 17 00:00:00 2001 From: Bedo Khaled <64221784+abdelrahman725@users.noreply.github.com> Date: Sat, 23 Mar 2024 10:05:12 +0200 Subject: [PATCH] docs: Remove manual flush memcached advice. Co-authored-by: Tim Abbott --- docs/subsystems/schema-migrations.md | 19 ++++++++++++------- docs/tutorials/new-feature-tutorial.md | 14 ++++++-------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/docs/subsystems/schema-migrations.md b/docs/subsystems/schema-migrations.md index ebde9eff1a..6f20c976dc 100644 --- a/docs/subsystems/schema-migrations.md +++ b/docs/subsystems/schema-migrations.md @@ -180,12 +180,17 @@ If you follow the processes described above, `tools/provision` and migrations and run migrations on (`./manage.py migrate`) or rebuild the relevant database automatically as appropriate. -While developing migrations, you may accidentally corrupt -your databases while debugging your new code. -You can always rebuild these databases from scratch. +Notably, both `manage.py migrate` (`git grep post_migrate.connect` for +details) and restarting `tools/run-dev` will flush `memcached`, so you +shouldn't have to worry about cached objects from a previous database +schema. -Use `tools/rebuild-test-database` to rebuild the database -used for `test-backend` and other automated tests. +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-dev-database` to rebuild the database -used in [manual testing](../development/using.md). +- Use `tools/rebuild-test-database` to rebuild the database + used for `test-backend` and other automated tests. + +- Use `tools/rebuild-dev-database` to rebuild the database + used in [manual testing](../development/using.md). diff --git a/docs/tutorials/new-feature-tutorial.md b/docs/tutorials/new-feature-tutorial.md index 8a55f43e4a..e4ce90d42e 100644 --- a/docs/tutorials/new-feature-tutorial.md +++ b/docs/tutorials/new-feature-tutorial.md @@ -83,14 +83,13 @@ following commands: ./manage.py migrate ``` -You can read our +It's highly recommended to read our [database migration documentation](../subsystems/schema-migrations.md) to learn more about creating and applying database migrations. -**Test your changes:** Once you've run the migration, flush memcached -on your development server (`./scripts/setup/flush-memcached`) and then -[restart the development server](../development/remote.md#running-the-development-server) -to avoid interacting with cached objects. +**Test your changes:** Once you've run the migration, [restart the +development +server](../development/remote.md#running-the-development-server). ### Backend changes @@ -262,9 +261,8 @@ Running migrations: Applying zerver.NNNN_realm_mandatory_topics... OK ``` -Once you've run the migration, flush memcached on your development -server (`./scripts/setup/flush-memcached`) and then [restart the development server](../development/remote.md#running-the-development-server) -to avoid interacting with cached objects. +Once you've run the migration, [restart the development +server](../development/remote.md#running-the-development-server). ### Handle database interactions