diff options
author | Mattia Rizzolo <mattia@debian.org> | 2017-06-15 21:31:22 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-06-16 16:28:34 +0200 |
commit | b2fd1a6cc0e3bfa2a8290062672ccbbce0a3d4e8 (patch) | |
tree | 738023f09e458664303d2e83e81fc34904a129f8 | |
parent | 063fcf303e36ca80199db0975836af86f6e2abec (diff) | |
download | jenkins.debian.net-b2fd1a6cc0e3bfa2a8290062672ccbbce0a3d4e8.tar.xz |
reproducible debian: db: s/testing/stretch/g
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
-rwxr-xr-x | bin/reproducible_db_maintenance.py | 10 |
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 + "')" ], } |