- reconnect to db after utf8 encoding
[plcapi.git] / tools / upgrade-db.py
index d7ceaa5..d307045 100755 (executable)
@@ -318,13 +318,16 @@ try:
                if os.system(recreate_cmd):
                        print "ERROR: database encoding failed. Aborting"
                        sys.exit(1)
-
+               
                os.remove(dump_file_encoded)
                os.remove(dump_file)
 except:
        raise
 
 
+db = connect()
+cursor = db.cursor()
+
 # parse the schema user wishes to upgrade to
 try:
        file = open(schema_file, 'r')