gonito/add-versions.sql

7 lines
398 B
MySQL
Raw Normal View History

2019-08-27 22:36:51 +02:00
2019-08-27 23:01:12 +02:00
insert into version("commit", major, minor, patch, description) select R.current_commit, 1, 0, 0, 'taken over' from challenge C, repo R where C.private_repo = R.id ;
2019-08-27 22:36:51 +02:00
2019-08-27 23:01:12 +02:00
update challenge set version = (select R.current_commit from repo R where private_repo = R.id);
2019-08-27 22:36:51 +02:00
update submission set version = (select R.current_commit from repo R, challenge C where C.private_repo = R.id and challenge = C.id);