[Qa-jenkins-scm] [jenkins.debian.net] 06/09: reproducible debian: db: s/testing/stretch/g

Holger Levsen holger at layer-acht.org
Fri Jun 16 14:38:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit b2fd1a6cc0e3bfa2a8290062672ccbbce0a3d4e8
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Jun 15 21:31:22 2017 +0200

    reproducible debian: db: s/testing/stretch/g
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 bin/reproducible_db_maintenance.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py
index 7d88bef..825a38a 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 + "')"
     ],
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list