From 9fdc2e2dd3436a5663133ca35f3f4d39b35303a3 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 30 Oct 2009 10:36:11 +0100 Subject: [PATCH] Oh well Signed-off-by: Joerg Jaspert --- dak/dakdb/update18.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dak/dakdb/update18.py b/dak/dakdb/update18.py index c462b16a..c3ace63d 100755 --- a/dak/dakdb/update18.py +++ b/dak/dakdb/update18.py @@ -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)) -- 2.39.5