diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-03-03 14:18:06 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-03-03 14:18:06 +0100 |
commit | 4c8b5a6b607a3f022875e925c4bd316fb92245b7 (patch) | |
tree | 7dcefefd56ed2a8a157684aaf34e7125116bfe10 /bin | |
parent | 6b3f2dc8709a8509ea5b365683c2ae8ae0e433dc (diff) | |
download | jenkins.debian.net-4c8b5a6b607a3f022875e925c4bd316fb92245b7.tar.xz |
reproducible: stats_builds_age needs (datum, suite) as primary key
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_db_maintenance.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py index e8c6c609..c1ab6d20 100755 --- a/bin/reproducible_db_maintenance.py +++ b/bin/reproducible_db_maintenance.py @@ -251,6 +251,21 @@ schema_updates = { '''DROP TABLE stats_builds_per_day;''', '''ALTER TABLE stats_builds_per_day_tmp RENAME TO stats_builds_per_day;''', 'INSERT INTO rb_schema VALUES ("5", "' + now + '")'], + 6: [ # stats_builds_age needs (datum, suite) as primary key + '''CREATE TABLE stats_builds_age_tmp + (datum TEXT NOT NULL, + suite TEXT NOT NULL, + oldest_reproducible REAL, + oldest_unreproducible REAL, + oldest_FTBFS REAL, + PRIMARY KEY (datum, suite))''', + '''INSERT INTO stats_builds_age_tmp (datum, suite, + oldest_reproducible, oldest_unreproducible, oldest_FTBFS) + SELECT datum, suite, oldest_reproducible, oldest_unreproducible, + FTBFS FROM stats_builds_age;''', + '''DROP TABLE stats_builds_age;''', + '''ALTER TABLE stats_builds_age_tmp RENAME TO stats_builds_age;''', + 'INSERT INTO rb_schema VALUES ("6", "' + now + '")'], } |