diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-03-02 11:35:54 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-03-02 11:35:54 +0100 |
commit | 22af280c8255d52d53ce33312c0d5305576fd68c (patch) | |
tree | 697db2ac19b570376c80401a32d8f09bc1d955ef /bin | |
parent | c0af6d26b055dc4c0a44f1cd45c03005ccd4b25f (diff) | |
download | jenkins.debian.net-22af280c8255d52d53ce33312c0d5305576fd68c.tar.xz |
reproducible: update db schema: stats_pkg_state needs (datum, suite) as primary key
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_db_maintenance.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py index 7ed20338..4a1be9f4 100755 --- a/bin/reproducible_db_maintenance.py +++ b/bin/reproducible_db_maintenance.py @@ -218,6 +218,23 @@ schema_updates = { '''ALTER TABLE stats_bugs ADD COLUMN open_umask INTEGER''', '''ALTER TABLE stats_bugs ADD COLUMN done_umask INTEGER''', 'INSERT INTO rb_schema VALUES ("3", "' + now + '")'], + 4: [ # stats_pkg_state needs (datum, suite) as primary key + '''CREATE TABLE stats_pkg_state_tmp + (datum TEXT NOT NULL, + suite TEXT NOT NULL, + untested INTEGER, + reproducible INTEGER, + unreproducible INTEGER, + FTBFS INTEGER, + other INTEGER, + PRIMARY KEY (datum, suite))''', + '''INSERT INTO stats_pkg_state_tmp (datum, suite, untested, + reproducible, unreproducible, FTBFS, other) + SELECT datum, suite, untested, reproducible, unreproducible, + FTBFS, other FROM stats_pkg_state;''', + '''DROP TABLE stats_pkg_state;''', + '''ALTER TABLE stats_pkg_state_tmp RENAME TO stats_pkg_state;''', + 'INSERT INTO rb_schema VALUES ("4", "' + now + '")'], } |