Skip to content

Commit

Permalink
Merge pull request #728 from hmcts/RDCC-6200-worker-skill
Browse files Browse the repository at this point in the history
[RDCC-6200] Sql query to delete functional test users from skill table
  • Loading branch information
manukundloo-hmcts authored May 19, 2023
2 parents b65eb24 + 5334471 commit d5ffecd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deletescript/sql/delete-functional-test-data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ where case_worker_id in (
);


delete from case_worker_skill
where case_worker_id in (
select cwp.case_worker_id from case_worker_profile cwp
where cwp.email_id like (values('cwr-rd-func-test-user-only-%'))
);

delete from case_worker_location
where case_worker_id in (
select cwp.case_worker_id from case_worker_profile cwp
Expand All @@ -36,6 +42,13 @@ where case_worker_id in (
where cwp.email_id like (values('staff-rd-profile-func-test-user-only-%'))
);


delete from case_worker_skill
where case_worker_id in (
select cwp.case_worker_id from case_worker_profile cwp
where cwp.email_id like (values('staff-rd-profile-func-test-user-only-%'))
);

delete from case_worker_profile cwp where
email_id like (values('cwr-rd-func-test-user-only-%'))
or email_id like (values('staff-rd-profile-func-test-user-only-%')) ;
Expand Down

0 comments on commit d5ffecd

Please sign in to comment.