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;""")
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)))