create separate method for each currentVersion of class_sqlThread module #1715
No reviewers
Labels
No Label
bug
build
dependencies
developers
documentation
duplicate
enhancement
formatting
invalid
legal
mobile
obsolete
packaging
performance
protocol
question
refactoring
regression
security
test
translation
usability
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Bitmessage/PyBitmessage-2024-12-22#1715
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "navjotcis/bug-fixes18"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have created a separate method for each version of the class_sqlThread module
and also added a decorator for removing repeated code.
As discussed on Skype, rework the decorator so that it handles the current version, and auto-populates the upgrade loop.
@ -23,0 +25,4 @@
def db_upgrade(*args, **kwargs): # pylint: disable=unused-argument
"""upgrade the migration"""
version_dict = kwargs
this looks weird
@ -29,0 +110,4 @@
"""version_three for upgrading inventory"""
self.inventory_upgrade()
@db_upgrade(versio_four=4)
typo
@ -29,0 +126,4 @@
parameters = (5,)
self.cur.execute(item, parameters)
@db_upgrade(versio_five=5)
typo
maybe add a dummy version 1?
Wouldn't it be better to tag 0.6.3.3 and declare it as last release supporting upgrade from 0.6.1 or older? I tried rewriting
class_sqlThread
too, but all attempts look ugly like this PR.This looks abandoned and superseded by #1760.