Skip to content

Commit a476f11

Browse files
committed
Correctly clean up more tables in clean.sql
1 parent 156c077 commit a476f11

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

transcripts/sql/clean.sql

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
-- Doesn't clean codebase tables since that just slows things down, but does clean out codebase ownership.
33
SET client_min_messages TO WARNING;
44
TRUNCATE TABLE users CASCADE;
5+
TRUNCATE TABLE superadmins CASCADE;
6+
TRUNCATE TABLE role_memberships CASCADE;
57
TRUNCATE TABLE loose_code_roots CASCADE;
68
TRUNCATE TABLE org_members CASCADE;
79
TRUNCATE TABLE tours CASCADE;
@@ -22,9 +24,18 @@ TRUNCATE TABLE contribution_status_events CASCADE;
2224
TRUNCATE TABLE tickets CASCADE;
2325
TRUNCATE TABLE comments CASCADE;
2426
TRUNCATE TABLE comment_revisions CASCADE;
27+
TRUNCATE TABLE teams CASCADE;
28+
TRUNCATE TABLE team_members CASCADE;
29+
TRUNCATE TABLE orgs CASCADE;
30+
TRUNCATE TABLE subjects CASCADE;
31+
TRUNCATE TABLE resources CASCADE;
32+
TRUNCATE TABLE contribution_diff_queue CASCADE;
33+
TRUNCATE TABLE namespace_diffs CASCADE;
2534

2635
TRUNCATE TABLE namespace_ownership CASCADE;
2736
TRUNCATE TABLE causal_ownership CASCADE;
37+
-- Transcripts should generally behave the same with or without truncating these, and leaving them in place saves
38+
-- time when rerunning tests.
2839
-- TRUNCATE TABLE branch_hashes CASCADE;
2940
-- TRUNCATE TABLE namespaces CASCADE;
3041
-- TRUNCATE TABLE causals CASCADE;

0 commit comments

Comments
 (0)