-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix database always trying to update #5543
Conversation
medariox
commented
Oct 29, 2018
- PR is based on the DEVELOP branch
- Don't send big changes all at once. Split up big PRs into multiple smaller PRs that are easier to manage and review
- Read the contribution guide
DeepCode analyzed this pull request. |
def checkDBVersion(self): | ||
return self.connection.checkDBVersion() | ||
def checkMajorDBVersion(self): | ||
return self.connection.checkDBVersion()[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.connection.checkDBVersion()
returns a tuple like: (41, 11)
(41, 11) >= 42
-> True
return self.connection.version | ||
|
||
def execute(self): | ||
utils.backup_database(self.connection.path, self.checkDBVersion()) | ||
utils.backup_database(self.connection.path, self.checkMajorDBVersion()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's okay, because these backups are going to be of very old versions (< 42) and won't have a minor version anyway. The new versions are using self.connection.version
which contains the major and minor version.