X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate29.py;h=c77d99dad5229510534fd08ffc773914b7d71ba4;hb=fa727dcf0058058565278421d16ea75c156e7fa3;hp=5df1ad810091f4ef09981101da7094e4e8d46cbb;hpb=9c66ac39be80ceb4fdcc58823852df090c10a029;p=dak.git diff --git a/dak/dakdb/update29.py b/dak/dakdb/update29.py index 5df1ad81..c77d99da 100644 --- a/dak/dakdb/update29.py +++ b/dak/dakdb/update29.py @@ -38,12 +38,7 @@ def do_update(self): try: c = self.db.cursor() - c.execute("""DROP AGGREGATE comma_separated_list( BASETYPE = text, - SFUNC = comma_concat, - STYPE = text, - INITCOND = '' -);""" ) - c.execute("""DROP FUNCTION comma_concat(text, text);""" ); + c.execute("""DROP FUNCTION comma_concat(text, text) CASCADE;""" ); c.execute("""DROP TABLE pending_content_associations;""") c.execute("""DROP TABLE content_associations;""") c.execute("""DROP TABLE content_file_names;""") @@ -52,6 +47,6 @@ def do_update(self): c.execute("UPDATE config SET value = '29' WHERE name = 'db_revision'") self.db.commit() - except psycopg2.ProgrammingError, msg: + except psycopg2.ProgrammingError as msg: self.db.rollback() - raise DBUpdateError, "Unable to appy debversion updates, rollback issued. Error message : %s" % (str(msg)) + raise DBUpdateError("Unable to appy debversion updates, rollback issued. Error message : %s" % (str(msg)))