SoloDB Documentation Version 1.0 Help

Clean up all runs

Run this query to remove all runs and substrates from the database. This will also remove all files associated with the runs.

SET FOREIGN_KEY_CHECKS = 0; DELETE FROM file_download WHERE file_id IN (SELECT file_id FROM run_run_file); DELETE FROM file_file_object WHERE file_id IN (SELECT file_id FROM run_run_file); DELETE FROM file_file WHERE id IN (SELECT file_id FROM run_run_file); DELETE FROM file_download WHERE file_id IN (SELECT file_id FROM run_step_file); DELETE FROM file_file_object WHERE file_id IN (SELECT file_id FROM run_step_file); DELETE FROM file_file WHERE id IN (SELECT file_id FROM run_step_file); DELETE FROM file_download WHERE file_id IN (SELECT file_id FROM substrate_substrate_file); DELETE FROM file_file_object WHERE file_id IN (SELECT file_id FROM substrate_substrate_file); DELETE FROM file_file WHERE id IN (SELECT file_id FROM substrate_substrate_file); TRUNCATE TABLE admin_permit_user; TRUNCATE TABLE deeplink; TRUNCATE TABLE run_changelog; TRUNCATE TABLE run_changelog_steps; TRUNCATE TABLE run_consumable; TRUNCATE TABLE run_consumable_matrix_consumable; TRUNCATE TABLE run_measurement; TRUNCATE TABLE run_measurement_label; TRUNCATE TABLE run_measurement_logging_parameter; TRUNCATE TABLE run_measurement_part; TRUNCATE TABLE run_measurement_result; TRUNCATE TABLE run_measurement_result_value; TRUNCATE TABLE run_measurement_summary; TRUNCATE TABLE run_measurement_summary_run; TRUNCATE TABLE run_measurement_summary_run_part; TRUNCATE TABLE run_parent; TRUNCATE TABLE run_parent_part; TRUNCATE TABLE run_part; TRUNCATE TABLE run_part_consumable_creation; TRUNCATE TABLE run_part_layout; TRUNCATE TABLE run_part_mapping; TRUNCATE TABLE run_priority; TRUNCATE TABLE run_related; TRUNCATE TABLE run_requirement; TRUNCATE TABLE run_requirement_label; TRUNCATE TABLE run_requirement_part; TRUNCATE TABLE run_requirement_target; TRUNCATE TABLE run_run; TRUNCATE TABLE run_run_batch_card; TRUNCATE TABLE run_run_file; TRUNCATE TABLE run_run_hold_code; TRUNCATE TABLE run_run_priority; TRUNCATE TABLE run_run_role; TRUNCATE TABLE run_run_variable; TRUNCATE TABLE run_service_work; TRUNCATE TABLE run_service_work_comment; TRUNCATE TABLE run_service_work_step; TRUNCATE TABLE run_step; TRUNCATE TABLE run_step_checklist; TRUNCATE TABLE run_step_file; TRUNCATE TABLE run_step_group; TRUNCATE TABLE run_step_label; TRUNCATE TABLE run_step_parameter; TRUNCATE TABLE run_step_parameter_value; TRUNCATE TABLE run_step_parameter_value_realised; TRUNCATE TABLE run_step_part; TRUNCATE TABLE run_step_part_action; TRUNCATE TABLE run_step_rework; TRUNCATE TABLE run_step_tag; TRUNCATE TABLE run_substrate; TRUNCATE TABLE run_substrate_matrix; TRUNCATE TABLE run_substrate_matrix_parent_part; TRUNCATE TABLE run_substrate_matrix_substrate; TRUNCATE TABLE substrate_io; TRUNCATE TABLE substrate_substrate; TRUNCATE TABLE substrate_substrate_file; TRUNCATE TABLE substrate_substrate_property; TRUNCATE TABLE substrate_type; TRUNCATE TABLE substrate_type_property; SET FOREIGN_KEY_CHECKS = 1;
07 April 2025