Add helper script for conversion to version 2

This commit is contained in:
Filip Gralinski 2021-02-27 11:27:04 +01:00
parent 75c7a5ef6d
commit bf00151a5e
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,5 @@
select count(*) from evaluation A, evaluation B where A.test = B.test and A.checksum = B.checksum and A.version = B.version and A.id < B.id ;
select A.score, B.score from evaluation A, evaluation B where A.test = B.test and A.checksum = B.checksum and A.version = B.version and A.id < B.id and A.score <> B.score;
select A.score, B.score from evaluation A, evaluation B where A.test = B.test and A.checksum = B.checksum and A.version is null and B.version is not null and A.id <> B.id and A.score <> B.score;

View File

@ -0,0 +1,2 @@
delete from evaluation where id in (select A.id from evaluation A, evaluation B where A.version = B.version and A.test = B.test and A.checksum = B.checksum and A.id < B.id group by A.id);