]> git.decadent.org.uk Git - dak.git/commitdiff
Oh well
authorJoerg Jaspert <joerg@debian.org>
Fri, 30 Oct 2009 09:36:11 +0000 (10:36 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 30 Oct 2009 09:36:11 +0000 (10:36 +0100)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/dakdb/update18.py

index c462b16af0e68fe53aec89d76824acb9daffd8dc..c3ace63d93e7f12282b5a882bc74a7b4a3743fd3 100755 (executable)
@@ -118,6 +118,12 @@ def do_update(self):
         c.execute("CREATE INDEX changesdistribution_ind ON known_changes(distribution)")
         c.execute("CREATE INDEX changesurgency_ind ON known_changes(urgency)")
 
+        c.execute("GRANT ALL ON known_changes TO ftpmaster;")
+        c.execute("GRANT SELECT ON known_changes TO public;")
+
+        c.execute("UPDATE config SET value = '18' WHERE name = 'db_revision'")
+        self.db.commit()
+
         print "Done. Now looking for old changes files"
         count = 0
         failure = 0
@@ -146,13 +152,6 @@ def do_update(self):
                         warn("found invalid changes file, not properly utf-8 encoded")
                         failure += 1
 
-
-        c.execute("GRANT ALL ON known_changes TO ftpmaster;")
-        c.execute("GRANT SELECT ON known_changes TO public;")
-
-        c.execute("UPDATE config SET value = '18' WHERE name = 'db_revision'")
-        self.db.commit()
-
     except psycopg2.ProgrammingError, msg:
         self.db.rollback()
         raise DBUpdateError, "Unable to apply knownchanges update 18, rollback issued. Error message : %s" % (str(msg))