test commit
This commit is contained in:
parent
bb38c158fe
commit
0dfc4dac7b
|
@ -22,13 +22,10 @@ from debug import logger
|
||||||
|
|
||||||
class UpgradeDB():
|
class UpgradeDB():
|
||||||
"""Upgrade Db with respect to versions"""
|
"""Upgrade Db with respect to versions"""
|
||||||
|
cur = None
|
||||||
def __init__(self, cur):
|
parameters = None
|
||||||
""" init variables globally """
|
current_level = None
|
||||||
self.cur = cur
|
max_level = 11
|
||||||
self.parameters = ""
|
|
||||||
self.current_level = self.get_current_level()
|
|
||||||
self.max_level = 11
|
|
||||||
|
|
||||||
def get_current_level(self):
|
def get_current_level(self):
|
||||||
# Upgrade Db with respect to their versions
|
# Upgrade Db with respect to their versions
|
||||||
|
@ -64,13 +61,12 @@ class UpgradeDB():
|
||||||
self.upgrade_schema_data_level(l)
|
self.upgrade_schema_data_level(l)
|
||||||
|
|
||||||
def upgrade_schema_data_level(self, level):
|
def upgrade_schema_data_level(self, level):
|
||||||
print "------------- Call upgrade level ", level
|
|
||||||
item = '''update settings set value=? WHERE key='version';'''
|
item = '''update settings set value=? WHERE key='version';'''
|
||||||
parameters = (level + 1,)
|
parameters = (level + 1,)
|
||||||
self.cur.execute(item, parameters)
|
self.cur.execute(item, parameters)
|
||||||
|
|
||||||
def upgrade_schema_data_1(self):
|
def upgrade_schema_data_1(self):
|
||||||
"""
|
"""inventory
|
||||||
For version 1 and 3
|
For version 1 and 3
|
||||||
Add a new column to the inventory table to store tags.
|
Add a new column to the inventory table to store tags.
|
||||||
"""
|
"""
|
||||||
|
|
Reference in New Issue
Block a user