+ if database_revision < required_database_schema:
+ print "\nUpdates to be applied:"
+ for i in range(database_revision, required_database_schema):
+ i += 1
+ dakdb = __import__("dakdb", globals(), locals(), ['update'+str(i)])
+ update_module = getattr(dakdb, "update"+str(i))
+ print "Update %d: %s" % (i, next(s for s in update_module.__doc__.split("\n") if s))
+ modules.append((update_module, i))
+ prompt = "\nUpdate database? (y/N) "
+ answer = utils.our_raw_input(prompt)
+ if answer.upper() != 'Y':
+ sys.exit(0)
+ else: