From 4c97278d4380afae01205e9c03c20e35066584d8 Mon Sep 17 00:00:00 2001 From: Mario Rogic Date: Fri, 8 Nov 2024 18:45:36 +1000 Subject: [PATCH 1/2] Update and rename uninstall.md to uninstall-or-reset.md --- website/docs/{uninstall.md => uninstall-or-reset.md} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename website/docs/{uninstall.md => uninstall-or-reset.md} (57%) diff --git a/website/docs/uninstall.md b/website/docs/uninstall-or-reset.md similarity index 57% rename from website/docs/uninstall.md rename to website/docs/uninstall-or-reset.md index 9f9b9388..750a6e96 100644 --- a/website/docs/uninstall.md +++ b/website/docs/uninstall-or-reset.md @@ -1,5 +1,5 @@ --- -title: "Uninstall" +title: "Uninstall or Reset" sidebar_position: 1000 --- @@ -9,3 +9,5 @@ statement: ```sql DROP SCHEMA graphile_worker CASCADE; ``` + +If you're resetting your schema, make sure your workers are scaled down before you execute this. From eff895ffad253cca9571233d840258bac0a0d4ff Mon Sep 17 00:00:00 2001 From: Benjie Date: Fri, 8 Nov 2024 10:08:46 +0000 Subject: [PATCH 2/2] Editorial --- website/docs/uninstall-or-reset.md | 13 ----------- website/docs/uninstall.md | 35 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 13 deletions(-) delete mode 100644 website/docs/uninstall-or-reset.md create mode 100644 website/docs/uninstall.md diff --git a/website/docs/uninstall-or-reset.md b/website/docs/uninstall-or-reset.md deleted file mode 100644 index 750a6e96..00000000 --- a/website/docs/uninstall-or-reset.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Uninstall or Reset" -sidebar_position: 1000 ---- - -To delete the worker code and all the jobs from your database, run this one SQL -statement: - -```sql -DROP SCHEMA graphile_worker CASCADE; -``` - -If you're resetting your schema, make sure your workers are scaled down before you execute this. diff --git a/website/docs/uninstall.md b/website/docs/uninstall.md new file mode 100644 index 00000000..b8eba3df --- /dev/null +++ b/website/docs/uninstall.md @@ -0,0 +1,35 @@ +--- +title: "Uninstall/Reset" +sidebar_position: 1000 +--- + +To delete the worker code and all the jobs from your database, run this one SQL +statement: + +```sql +DROP SCHEMA graphile_worker CASCADE; +``` + +(If you are using an alternative schema for Graphile Worker, please update the +command accordingly.) + +:::danger This may also drop some of your database functions/constraints! + +Any functionality in your database that depends on Graphile Worker (according to +PostgreSQL's tracking of dependencies - see +[pg_depend](https://www.postgresql.org/docs/current/catalog-pg-depend.html) in +the PostgreSQL docs) may also be dropped by the `CASCADE`; this includes +database functions (including trigger functions), and foreign key constraints. + +It's recommended to try this on a non-production environment first to see its +effects, and to do a schema-only dump of your database before and after to +compare the changes and look for unexpected consequences. + +::: + +:::warning Scale to zero first! + +Before running this command, you should make sure there are no running Graphile +Worker instances. + +:::