delete from project_measures where analysis_uuid in #{analysisUuid,jdbcType=VARCHAR} delete from project_measures where component_uuid in #{componentUuid,jdbcType=VARCHAR} delete from duplications_index where analysis_uuid in #{analysisUuid,jdbcType=VARCHAR} delete from events where analysis_uuid in #{analysisUuid,jdbcType=VARCHAR} delete from event_component_changes where event_analysis_uuid in #{analysisUuid,jdbcType=VARCHAR} delete from snapshots where uuid in #{analysisUuid,jdbcType=VARCHAR} DELETE FROM analysis_properties WHERE analysis_uuid IN #{analysisUuid,jdbcType=VARCHAR} update snapshots set purged = ${_true} where uuid in #{analysisUuid,jdbcType=VARCHAR} update issues set status='CLOSED', resolution='REMOVED', updated_at=#{dateAsLong}, issue_close_date=#{dateAsLong}, issue_update_date=#{dateAsLong} where component_uuid in #{componentUuid,jdbcType=VARCHAR} and resolution is null delete from project_links where project_uuid = #{rootUuid,jdbcType=VARCHAR} delete from properties where entity_uuid in #{entityUuid} delete from components where branch_uuid = #{rootUuid,jdbcType=VARCHAR} delete from components where branch_uuid IN (SELECT pb.uuid from project_branches pb where pb.is_main = ${_false} and pb.project_uuid = #{uuid,jdbcType=VARCHAR}) delete from projects where uuid = #{projectUuid,jdbcType=VARCHAR} delete from components where uuid in #{componentUuid,jdbcType=VARCHAR} delete from group_roles where entity_uuid = #{entityUuid,jdbcType=INTEGER} delete from user_roles where entity_uuid = #{entityUuid,jdbcType=INTEGER} delete from events where component_uuid = #{componentUuid,jdbcType=VARCHAR} delete from event_component_changes where event_component_uuid = #{componentUuid,jdbcType=VARCHAR} delete from issues where project_uuid = #{projectUuid,jdbcType=VARCHAR} delete from issue_changes where project_uuid = #{projectUuid,jdbcType=VARCHAR} delete from new_code_reference_issues where issue_key in ( select kee from issues where project_uuid = #{projectUuid,jdbcType=VARCHAR} ) delete from issues_impacts where issue_key in ( select kee from issues where project_uuid = #{projectUuid,jdbcType=VARCHAR} ) delete from file_sources where project_uuid=#{rootProjectUuid,jdbcType=VARCHAR} delete from file_sources where file_uuid in #{fileUuid,jdbcType=VARCHAR} DELETE FROM issues WHERE kee IN #{key,jdbcType=VARCHAR} DELETE FROM app_projects WHERE application_uuid=#{applicationUuid,jdbcType=VARCHAR} DELETE FROM app_projects WHERE project_uuid=#{projectUuid,jdbcType=VARCHAR} DELETE FROM app_branch_project_branch WHERE application_uuid=#{applicationUuid,jdbcType=VARCHAR} DELETE FROM app_branch_project_branch WHERE project_uuid=#{projectUuid,jdbcType=VARCHAR} DELETE FROM app_branch_project_branch WHERE application_branch_uuid=#{branchUuid,jdbcType=VARCHAR} DELETE FROM app_branch_project_branch WHERE project_branch_uuid=#{projectBranchUuid,jdbcType=VARCHAR} DELETE FROM portfolio_projects WHERE uuid in ( SELECT ppb.portfolio_project_uuid FROM portfolio_proj_branches ppb WHERE ppb.branch_uuid = #{branchUuid,jdbcType=VARCHAR} AND (SELECT count(*) FROM portfolio_proj_branches ppb2 WHERE ppb2.portfolio_project_uuid = ppb.portfolio_project_uuid) = 1 ) DELETE FROM portfolio_projects WHERE project_uuid=#{projectUuid,jdbcType=VARCHAR} DELETE FROM portfolio_proj_branches WHERE portfolio_project_uuid IN (SELECT uuid FROM portfolio_projects WHERE project_uuid = #{branchUuid,jdbcType=VARCHAR}) OR branch_uuid = #{branchUuid,jdbcType=VARCHAR} DELETE FROM issue_changes WHERE issue_key IN #{issueKey,jdbcType=VARCHAR} DELETE FROM new_code_reference_issues WHERE issue_key IN #{issueKey,jdbcType=VARCHAR} DELETE FROM issues_impacts WHERE issue_key IN #{issueKey,jdbcType=VARCHAR} delete from ce_scanner_context where task_uuid in ( select uuid from ce_activity ) delete from ce_task_characteristics where task_uuid in ( select uuid from ce_activity ) delete from ce_task_input where task_uuid in ( select uuid from ce_activity ) delete from ce_task_message where task_uuid in ( select uuid from ce_activity ) delete from ce_activity where created_at < #{createdAtBefore,jdbcType=BIGINT} and ( component_uuid=#{rootUuid,jdbcType=VARCHAR} or entity_uuid=#{entityUuidToPurge,jdbcType=VARCHAR} ) created_at < #{createdAtBefore,jdbcType=BIGINT} component_uuid=#{rootUuid,jdbcType=VARCHAR} or entity_uuid=#{entityUuidToPurge,jdbcType=VARCHAR} 1 = 2 delete from ce_scanner_context where task_uuid in ( select uuid from ce_queue where component_uuid=#{rootUuid,jdbcType=VARCHAR} or entity_uuid=#{rootUuid,jdbcType=VARCHAR} ) delete from ce_task_characteristics where task_uuid in ( select uuid from ce_queue where component_uuid=#{rootUuid,jdbcType=VARCHAR} or entity_uuid=#{rootUuid,jdbcType=VARCHAR} ) delete from ce_task_input where task_uuid in ( select uuid from ce_queue where component_uuid=#{rootUuid,jdbcType=VARCHAR} or entity_uuid=#{rootUuid,jdbcType=VARCHAR} ) delete from ce_task_message where task_uuid in ( select uuid from ce_queue where component_uuid=#{rootUuid,jdbcType=VARCHAR} or entity_uuid=#{rootUuid,jdbcType=VARCHAR} ) delete from ce_queue where component_uuid=#{rootUuid,jdbcType=VARCHAR} or entity_uuid=#{rootUuid,jdbcType=VARCHAR} DELETE FROM new_code_periods WHERE project_uuid=#{projectUuid,jdbcType=VARCHAR} DELETE FROM new_code_periods WHERE branch_uuid=#{branchUuid,jdbcType=VARCHAR} delete from webhooks where project_uuid=#{projectUuid,jdbcType=VARCHAR} delete from webhook_deliveries where project_uuid=#{projectUuid,jdbcType=VARCHAR} delete from project_alm_settings where project_uuid=#{projectUuid,jdbcType=VARCHAR} delete from project_badge_token where project_uuid=#{projectUuid,jdbcType=VARCHAR} delete from project_branches where uuid=#{uuid,jdbcType=VARCHAR} delete from measures where branch_uuid = #{branchUuid,jdbcType=VARCHAR} delete from measures where component_uuid in #{componentUuid, jdbcType=VARCHAR} delete from user_dismissed_messages where project_uuid = #{projectUuid,jdbcType=VARCHAR} delete from scanner_analysis_cache where branch_uuid = #{branchUuid,jdbcType=VARCHAR} delete from report_schedules where branch_uuid = #{branchUuid,jdbcType=VARCHAR} delete from report_subscriptions where branch_uuid = #{branchUuid,jdbcType=VARCHAR} delete from report_schedules where portfolio_uuid in #{portfolioUuid, jdbcType=VARCHAR} delete from report_subscriptions where portfolio_uuid in #{portfolioUuid, jdbcType=VARCHAR} delete from anticipated_transitions where project_uuid = #{projectUuid,jdbcType=VARCHAR} and created_at < #{createdAtBefore,jdbcType=BIGINT} delete from issues_fixed where pull_request_uuid = #{branchUuid,jdbcType=VARCHAR} delete from architecture_graphs where branch_uuid = #{branchUuid,jdbcType=VARCHAR} delete from sca_analyses where component_uuid = #{componentUuid,jdbcType=VARCHAR} delete from sca_dependencies where sca_release_uuid in (select uuid from sca_releases where component_uuid = #{componentUuid,jdbcType=VARCHAR}) delete from sca_issues_releases where sca_release_uuid in (select uuid from sca_releases where component_uuid = #{componentUuid,jdbcType=VARCHAR}) delete from sca_issue_rels_changes where sca_issues_releases_uuid in (select sca_issues_releases.uuid from sca_issues_releases join sca_releases on sca_releases.uuid = sca_issues_releases.sca_release_uuid where sca_releases.component_uuid = #{componentUuid,jdbcType=VARCHAR}) delete from sca_releases where component_uuid = #{componentUuid,jdbcType=VARCHAR} delete from sca_lic_prof_projects where project_uuid = #{projectUuid,jdbcType=VARCHAR}