File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
src/main/resources/db_changelog Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 661
661
</rollback >
662
662
</changeSet >
663
663
664
+ <changeSet id =" Update SELECT_LATEST_RESULTS_BY_MILESTONE with Select columns" author =" v.kostyukevich" >
665
+ <sql endDelimiter =" #" >
666
+
667
+ DROP PROCEDURE IF EXISTS `SELECT_LATEST_RESULTS_BY_MILESTONE`;
668
+
669
+ #
670
+
671
+ CREATE PROCEDURE `SELECT_LATEST_RESULTS_BY_MILESTONE`(
672
+ IN request_milestone_id VARCHAR(11)
673
+ )
674
+ BEGIN
675
+ select final.*
676
+ from test_results AS final
677
+ inner join (
678
+
679
+ Select t_r.test_id, MAX(t_r.finish_date) as finish_date from test_results AS t_r
680
+ right join (select test_runs.* from test_runs
681
+
682
+ right join (select * from milestone_suites where milestone_id = request_milestone_id)
683
+ as links ON test_runs.test_suite_id = links.suite_id AND test_runs.milestone_id = request_milestone_id where test_runs.debug = 0)
684
+
685
+ as runs ON t_r.test_run_id = runs.id
686
+ group BY t_r.test_id, runs.test_suite_id
687
+
688
+ ) AS tests ON final.test_id = tests.test_id AND final.finish_date = tests.finish_date;
689
+ END
690
+ </sql >
691
+ <rollback >
692
+ DROP FUNCTION IF EXISTS `SELECT_LATEST_RESULTS_BY_MILESTONE`;
693
+ </rollback >
694
+ </changeSet >
695
+
696
+
697
+
664
698
</databaseChangeLog >
You can’t perform that action at this time.
0 commit comments