create separate method for each currentVersion of class_sqlThread module #1715

Open
navjotcis wants to merge 2 commits from navjotcis/bug-fixes18 into v0.6
navjotcis commented 2021-01-13 21:46:10 +01:00 (Migrated from github.com)

I have created a separate method for each version of the class_sqlThread module
and also added a decorator for removing repeated code.

I have created a separate method for each version of the class_sqlThread module and also added a decorator for removing repeated code.
PeterSurda (Migrated from github.com) requested changes 2021-01-19 12:39:34 +01:00
PeterSurda (Migrated from github.com) left a comment

As discussed on Skype, rework the decorator so that it handles the current version, and auto-populates the upgrade loop.

As discussed on Skype, rework the decorator so that it handles the current version, and auto-populates the upgrade loop.
PeterSurda (Migrated from github.com) requested changes 2021-01-21 09:32:44 +01:00
@ -23,0 +25,4 @@
def db_upgrade(*args, **kwargs): # pylint: disable=unused-argument
"""upgrade the migration"""
version_dict = kwargs
PeterSurda (Migrated from github.com) commented 2021-01-21 09:30:59 +01:00

this looks weird

this looks weird
@ -29,0 +110,4 @@
"""version_three for upgrading inventory"""
self.inventory_upgrade()
@db_upgrade(versio_four=4)
PeterSurda (Migrated from github.com) commented 2021-01-21 09:31:14 +01:00

typo

typo
@ -29,0 +126,4 @@
parameters = (5,)
self.cur.execute(item, parameters)
@db_upgrade(versio_five=5)
PeterSurda (Migrated from github.com) commented 2021-01-21 09:31:24 +01:00

typo

typo
PeterSurda (Migrated from github.com) commented 2021-01-21 09:32:30 +01:00

maybe add a dummy version 1?

maybe add a dummy version 1?
g1itch commented 2021-02-02 16:03:19 +01:00 (Migrated from github.com)

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.

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.
g1itch commented 2021-05-28 15:17:06 +02:00 (Migrated from github.com)

This looks abandoned and superseded by #1760.

This looks abandoned and superseded by #1760.
This repo is archived. You cannot comment on pull requests.
No description provided.