summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-06-17 13:24:06 +0200
committerHolger Levsen <holger@layer-acht.org>2015-06-17 13:24:06 +0200
commit6fe50c56622917146213eb5f8eecd392a49340c0 (patch)
tree6008e1c988622a9af1e356fea042d88f1e136f44
parent45681a26220ce1b4a522c0b412acb937ccf492fa (diff)
downloadjenkins.debian.net-6fe50c56622917146213eb5f8eecd392a49340c0.tar.xz
reproducible: provide default '0' value for all columns in stats_bugs (fixup for f9147e8b)
-rwxr-xr-xbin/reproducible_db_maintenance.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py
index 3c31da97..588d3cd1 100755
--- a/bin/reproducible_db_maintenance.py
+++ b/bin/reproducible_db_maintenance.py
@@ -380,6 +380,44 @@ schema_updates = {
'''ALTER TABLE stats_bugs ADD COLUMN open_ftbfs INTEGER''',
'''ALTER TABLE stats_bugs ADD COLUMN done_ftbfs INTEGER''',
'INSERT INTO rb_schema VALUES ("15", "' + now + '")'],
+ 16: [ # add default value to stats_bugs.(open|done)_ftbfs to get a full 'done vs open bugs' graph
+ '''CREATE TABLE stats_bugs_tmp
+ (datum TEXT NOT NULL,
+ open_toolchain INTEGER DEFAULT '0',
+ done_toolchain INTEGER DEFAULT '0',
+ open_infrastructure INTEGER DEFAULT '0',
+ done_infrastructure INTEGER DEFAULT '0',
+ open_timestamps INTEGER DEFAULT '0',
+ done_timestamps INTEGER DEFAULT '0',
+ open_fileordering INTEGER DEFAULT '0',
+ done_fileordering INTEGER DEFAULT '0',
+ open_buildpath INTEGER DEFAULT '0',
+ done_buildpath INTEGER DEFAULT '0',
+ open_username INTEGER DEFAULT '0',
+ done_username INTEGER DEFAULT '0',
+ open_hostname INTEGER DEFAULT '0',
+ done_hostname INTEGER DEFAULT '0',
+ open_uname INTEGER DEFAULT '0',
+ done_uname INTEGER DEFAULT '0',
+ open_randomness INTEGER DEFAULT '0',
+ done_randomness INTEGER DEFAULT '0',
+ open_buildinfo INTEGER DEFAULT '0',
+ done_buildinfo INTEGER DEFAULT '0',
+ open_cpu INTEGER DEFAULT '0',
+ done_cpu INTEGER DEFAULT '0',
+ open_signatures INTEGER DEFAULT '0',
+ done_signatures INTEGER DEFAULT '0',
+ open_environment INTEGER DEFAULT '0',
+ done_environment INTEGER DEFAULT '0',
+ open_umask INTEGER DEFAULT '0',
+ done_umask INTEGER DEFAULT '0',
+ open_ftbfs INTEGER DEFAULT '0',
+ done_ftbfs INTEGER DEFAULT '0',
+ PRIMARY KEY (datum))''',
+ 'INSERT INTO stats_bugs_tmp SELECT * FROM stats_bugs',
+ 'DROP TABLE stats_bugs',
+ 'ALTER TABLE stats_bugs_tmp RENAME TO stats_bugs',
+ 'INSERT INTO rb_schema VALUES ("16", "' + now + '")'],
}