|
| 1 | +<?xml version="1.1" encoding="UTF-8" standalone="no"?> |
| 2 | +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> |
| 5 | + <changeSet id="clean-old-tests" author="kevinmessiaen"> |
| 6 | + <sql> |
| 7 | + DELETE |
| 8 | + FROM test_function_arguments tfa |
| 9 | + WHERE tfa.function_uuid IN (SELECT cf.uuid |
| 10 | + FROM callable_functions cf |
| 11 | + WHERE cf.callable_type = 'TEST' |
| 12 | + AND cf.module LIKE 'giskard.ml_worker.testing.tests.%'); |
| 13 | + DELETE |
| 14 | + FROM suite_test_execution ste |
| 15 | + WHERE ste.test_id IN (SELECT st.id |
| 16 | + FROM suite_test st |
| 17 | + JOIN callable_functions cf |
| 18 | + ON cf.uuid = st.test_function_uuid |
| 19 | + WHERE cf.callable_type = 'TEST' |
| 20 | + AND cf.module LIKE 'giskard.ml_worker.testing.tests.%'); |
| 21 | + DELETE |
| 22 | + FROM test_input ti |
| 23 | + WHERE ti.suite_test_id IN (SELECT st.id |
| 24 | + FROM suite_test st |
| 25 | + JOIN callable_functions cf |
| 26 | + ON cf.uuid = st.test_function_uuid |
| 27 | + WHERE cf.callable_type = 'TEST' |
| 28 | + AND cf.module LIKE 'giskard.ml_worker.testing.tests.%'); |
| 29 | + DELETE |
| 30 | + FROM suite_test st |
| 31 | + WHERE st.test_function_uuid IN (SELECT cf.uuid |
| 32 | + FROM callable_functions cf |
| 33 | + WHERE cf.callable_type = 'TEST' |
| 34 | + AND cf.module LIKE 'giskard.ml_worker.testing.tests.%'); |
| 35 | + DELETE |
| 36 | + FROM callable_functions cf |
| 37 | + WHERE cf.callable_type = 'TEST' |
| 38 | + AND cf.module LIKE 'giskard.ml_worker.testing.tests.%' |
| 39 | + </sql> |
| 40 | + </changeSet> |
| 41 | +</databaseChangeLog> |
0 commit comments