Part of #79
Question
Remove two orphaned modeling rows from TACC's production database. They cannot be deleted from the app.
Why the app cannot do it
They were created while verifying #116, and deleted with the old client, which removes the CREATE provenance before the row. That provenance is the user delete permission, so the rows survive with no owner. mosorio cannot see them; anonymous can. The fixed client (#115) cannot delete them either — the permission it needs is already gone.
Same state as the #92 orphan. Fold that one in if its ids are to hand.
| problem_statement |
task |
thread |
dqu2ft1qmsnwzf7l |
ck7ck3zwmsnwzfsi |
l7gs1mozmsnwzg27 |
dkgbvxpzmsnx9u6o |
1ier73rsmsnx9uy8 |
5wjaat9bmsnx9v7y |
Both are named DELETE TEST #116 .... Neither carries a thread_model, dataslice or thread_data — every one of those root fields reported affected_rows 0.
SQL
Needs the admin secret or direct psql. Bottom-up, because the structural FKs are not cascading — only the six provenance and permission FKs are, and those clean themselves up when the parent goes.
BEGIN;
DELETE FROM thread
WHERE task_id IN (
SELECT id FROM task
WHERE problem_statement_id IN ('dqu2ft1qmsnwzf7l', 'dkgbvxpzmsnx9u6o')
);
DELETE FROM task
WHERE problem_statement_id IN ('dqu2ft1qmsnwzf7l', 'dkgbvxpzmsnx9u6o');
DELETE FROM problem_statement
WHERE id IN ('dqu2ft1qmsnwzf7l', 'dkgbvxpzmsnx9u6o');
COMMIT;
Expect 2 rows from each statement. Check for a long-lived transaction first — see docs/runbook-116-cascade-migration.md step 1c and #119.
Verify
Anonymously, no token:
curl -s https://graphql.mint.tacc.utexas.edu/v1/graphql \
-H 'Content-Type: application/json' \
-d '{"query":"{ problem_statement(where: {name: {_ilike: \"%DELETE TEST #116%\"}}) { id name } }"}'
Must return an empty list. anonymous is the role that can see these, so this is the check that counts.
Part of #79
Question
Remove two orphaned modeling rows from TACC's production database. They cannot be deleted from the app.
Why the app cannot do it
They were created while verifying #116, and deleted with the old client, which removes the CREATE provenance before the row. That provenance is the
userdelete permission, so the rows survive with no owner.mosoriocannot see them;anonymouscan. The fixed client (#115) cannot delete them either — the permission it needs is already gone.Same state as the #92 orphan. Fold that one in if its ids are to hand.
dqu2ft1qmsnwzf7lck7ck3zwmsnwzfsil7gs1mozmsnwzg27dkgbvxpzmsnx9u6o1ier73rsmsnx9uy85wjaat9bmsnx9v7yBoth are named
DELETE TEST #116 .... Neither carries a thread_model, dataslice or thread_data — every one of those root fields reportedaffected_rows 0.SQL
Needs the admin secret or direct psql. Bottom-up, because the structural FKs are not cascading — only the six provenance and permission FKs are, and those clean themselves up when the parent goes.
Expect 2 rows from each statement. Check for a long-lived transaction first — see
docs/runbook-116-cascade-migration.mdstep 1c and #119.Verify
Anonymously, no token:
Must return an empty list.
anonymousis the role that can see these, so this is the check that counts.