mirror of https://gitlab.com/pamhyr/pamhyr2
DB: Some fixes for db update 0.1.0.
parent
c7b5b40eda
commit
9a0476aa46
|
|
@ -20,7 +20,7 @@ from Model.Except import NotImplementedMethodeError
|
||||||
|
|
||||||
|
|
||||||
class Point(object):
|
class Point(object):
|
||||||
def __init__(self, id:int = -1, name: str = "",
|
def __init__(self, id: int = -1, name: str = "",
|
||||||
profile=None, status=None):
|
profile=None, status=None):
|
||||||
super(Point, self).__init__()
|
super(Point, self).__init__()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,17 +128,16 @@ class REPLine(SQLSubModel):
|
||||||
if major == minor == "0":
|
if major == minor == "0":
|
||||||
if int(release) < 9:
|
if int(release) < 9:
|
||||||
cls._db_create(execute)
|
cls._db_create(execute)
|
||||||
|
else:
|
||||||
if 9 < int(release) < 14:
|
cls._db_update_to_0_0_14(execute, data)
|
||||||
cls._db_update_to_0_0_14(execute)
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_update_to_0_0_14(cls, execute):
|
def _db_update_to_0_0_14(cls, execute, data):
|
||||||
table = "rep_lines"
|
table = "rep_lines"
|
||||||
|
|
||||||
cls.update_db_add_pamhyr_id(execute, table)
|
cls.update_db_add_pamhyr_id(execute, table, data)
|
||||||
Scenario.update_db_add_scenario(execute, table)
|
Scenario.update_db_add_scenario(execute, table)
|
||||||
|
|
||||||
cls._db_create(execute, ext="_tmp")
|
cls._db_create(execute, ext="_tmp")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue