From: Barry deFreese Date: Mon, 23 Nov 2009 20:25:31 +0000 (+0000) Subject: Fix indentation on commit to be outside for loop but inside try. Add update to db_rev... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa05503ac04f3e6cb22c22ab9b75d72abe4a4ca1;p=dak Fix indentation on commit to be outside for loop but inside try. Add update to db_revision to set it to 26. --- diff --git a/dak/dakdb/update26.py b/dak/dakdb/update26.py index 70ad62b8..3c7b0825 100755 --- a/dak/dakdb/update26.py +++ b/dak/dakdb/update26.py @@ -57,8 +57,9 @@ def do_update(self): c.execute("""CREATE TRIGGER modified_%s BEFORE UPDATE ON %s FOR EACH ROW EXECUTE PROCEDURE tfunc_set_modified()""" % (updatetable, updatetable)) - print "Committing" - self.db.commit() + print "Committing" + c.execute("UPDATE config SET value = '26' WHERE name = 'db_revision'") + self.db.commit() except psycopg2.InternalError, msg: self.db.rollback()