[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master 2/3] Fix indentation on commit to be outside for loop but inside try. Add update to db_revision to set it to 26.



---
 dak/dakdb/update26.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dak/dakdb/update26.py b/dak/dakdb/update26.py
index 70ad62b..3c7b082 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()
-- 
1.6.3.3



Reply to: