summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@debian.org>2017-06-15 21:31:22 +0200
committerHolger Levsen <holger@layer-acht.org>2017-06-16 16:28:34 +0200
commitb2fd1a6cc0e3bfa2a8290062672ccbbce0a3d4e8 (patch)
tree738023f09e458664303d2e83e81fc34904a129f8 /bin
parent063fcf303e36ca80199db0975836af86f6e2abec (diff)
downloadjenkins.debian.net-b2fd1a6cc0e3bfa2a8290062672ccbbce0a3d4e8.tar.xz
reproducible debian: db: s/testing/stretch/g
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_db_maintenance.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py
index 7d88befd..825a38ae 100755
--- a/bin/reproducible_db_maintenance.py
+++ b/bin/reproducible_db_maintenance.py
@@ -574,7 +574,7 @@ schema_updates = {
'''ALTER TABLE stats_meta_pkg_state_tmp RENAME TO stats_meta_pkg_state;''',
"INSERT INTO rb_schema (version, date) VALUES (28, '" + now + "')"],
- # THE FOLLOWING UPDATE CAN ONLY BE PREFORMED ON POSTGRES DATABASE
+ # THE FOLLOWING UPDATES CAN ONLY BE PREFORMED ON POSTGRES DATABASE
29: [ # Add auto incrementing to the id columns of some tables
"CREATE SEQUENCE schedule_id_seq",
@@ -598,7 +598,13 @@ schema_updates = {
diffoscope_timeouts INTEGER,
diffoscope_crashes INTEGER,
PRIMARY KEY (datum))''',
- '''INSERT INTO rb_schema (version, date) VALUES (30, '" + now + "')'''
+ "INSERT INTO rb_schema (version, date) VALUES (30, '" + now + "')"
+ ],
+ 31: # rename the 'testing' suite into 'stretch'
+ [ "UPDATE {} SET suite='stretch' WHERE suite='testing'".format(t)
+ for t in ("sources", "stats_pkg_state", "stats_builds_per_day",
+ "stats_builds_age", "stats_meta_pkg_state", "stats_build")] + [
+ "INSERT INTO rb_schema (version, date) VALUES (31, '" + now + "')"
],
}