Skip to content

Commit 288173e

Browse files
author
Agent
committed
docs(website): drop manual-install instructions for delete_flow_and_data
The Delete Flow and its Data guide told users to install pgflow.delete_flow_and_data manually by pasting the function SQL. The function ships in pgflow migrations (pkgs/core/schemas/0100_function_delete_flow_and_data.sql) since v0.10.0, so the caution aside, the Installing the Function section, and the embedded SQL listing were stale and confusing. Replace them with a version note: built-in helper, installed automatically by pgflow migrations, available since v0.10.0, no manual SQL setup. Danger aside, usage example, After Deleting, and See Also stay unchanged. Fixes #608
1 parent 078aa1e commit 288173e

1 file changed

Lines changed: 4 additions & 17 deletions

File tree

‎pkgs/website/src/content/docs/build/delete-flows.mdx‎

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ next:
88
label: Operate
99
---
1010

11-
import { Aside, Code, CardGrid, LinkCard } from "@astrojs/starlight/components";
12-
import deleteFlowFunctionCode from '@/../../core/supabase/tests/_shared/delete_flow_and_data.sql.raw?raw';
11+
import { Aside, CardGrid, LinkCard } from "@astrojs/starlight/components";
1312

1413
During development, you may want to completely remove a flow and all its data to make breaking changes, clean up test data, or start fresh after experimenting. This operation is destructive and should **only be used in development environments**.
1514

@@ -25,7 +24,9 @@ This permanently deletes all flow data including:
2524

2625
## Using the Delete Function
2726

28-
The delete function accepts a flow slug parameter and removes all associated data:
27+
`pgflow.delete_flow_and_data` is a built-in helper installed automatically by pgflow migrations. It is available since pgflow v0.10.0, so there is no manual SQL setup.
28+
29+
The function accepts a flow slug parameter and removes all associated data:
2930

3031
```sql
3132
pgflow.delete_flow_and_data(flow_slug TEXT)
@@ -39,20 +40,6 @@ SELECT pgflow.delete_flow_and_data('analyzeWebsite');
3940

4041
This deletes the flow definition, all runs, queued messages, and task outputs for the specified flow.
4142

42-
## Installing the Function
43-
44-
<Aside type="caution" title="Manual Installation Required">
45-
This function is not included in default pgflow migrations to prevent accidental deployment to production. It has been thoroughly unit tested, but you must manually add it to your development database using the SQL in the [Delete Function](#the-delete-function) section below.
46-
</Aside>
47-
48-
Install by running the SQL directly in your database using `psql` or Supabase Studio.
49-
50-
## The Delete Function
51-
52-
Run this SQL to install the delete function:
53-
54-
<Code lang="sql" code={deleteFlowFunctionCode} />
55-
5643
## After Deleting
5744

5845
Once you've deleted the flow:

0 commit comments

Comments
 (0)