Make updating database schema more robust. Now updating the schema but failing to update the version should be impossible

This commit is contained in:
Kovid Goyal 2010-04-02 09:41:49 +05:30
parent 8fa21c510d
commit b723baa16c

View File

@ -477,7 +477,6 @@ class LibraryDatabase2(LibraryDatabase):
else: else:
print 'Upgrading database to version %d...'%(self.user_version+1) print 'Upgrading database to version %d...'%(self.user_version+1)
meth() meth()
self.conn.commit()
self.user_version += 1 self.user_version += 1
self.data = ResultCache() self.data = ResultCache()