diff options
author | Pascal Terjan <pterjan@mageia.org> | 2020-04-14 20:23:59 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2020-04-14 20:23:59 +0000 |
commit | a1e9c356131835a464cd2a5b81ed5fb2b0bbad8b (patch) | |
tree | 6ba4efd2bf70415c2730bdda615f38e9074c71bc | |
parent | 7f2df584007b3c48d427aa636fa6919bb04d2d91 (diff) | |
download | autobuild-a1e9c356131835a464cd2a5b81ed5fb2b0bbad8b.tar autobuild-a1e9c356131835a464cd2a5b81ed5fb2b0bbad8b.tar.gz autobuild-a1e9c356131835a464cd2a5b81ed5fb2b0bbad8b.tar.bz2 autobuild-a1e9c356131835a464cd2a5b81ed5fb2b0bbad8b.tar.xz autobuild-a1e9c356131835a464cd2a5b81ed5fb2b0bbad8b.zip |
Fix drop to handle "recently" added tables
-rwxr-xr-x | autobuild.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/autobuild.rb b/autobuild.rb index a58ca97..222fb66 100755 --- a/autobuild.rb +++ b/autobuild.rb @@ -218,6 +218,8 @@ def drop_run(db, r) t_start = Date.parse(r).strftime('%s') run_id = db.execute("SELECT Id FROM Runs WHERE Start='#{t_start}'")[0][0] puts "Dropping run #{t_start}" + db.execute "DELETE FROM Attributes WHERE Run = #{run_id}" + db.execute "DELETE FROM Diffs WHERE Run = #{run_id}" db.execute "DELETE FROM Results WHERE Run = #{run_id}" db.execute "DELETE FROM Runs WHERE Id = #{run_id}" end |