Day 2, full DB import/update/delete from dir with XML or HTTP
This commit is contained in:
@@ -2,17 +2,20 @@
|
||||
|
||||
|
||||
class DbSchema:
|
||||
def __init__(self, name, fieldlist, xmltag):
|
||||
def __init__(self, name, fieldlist, unique_key, xmltag):
|
||||
self.tablename = name
|
||||
self.fields = fieldlist
|
||||
self.unique_field = unique_key
|
||||
self.xml_tag = xmltag
|
||||
|
||||
|
||||
db_shemas = dict()
|
||||
db_shemas['ADDROBJ'] = DbSchema("ADDROBJ",
|
||||
["AOID", "AOGUID", "SHORTNAME", "FORMALNAME", "AOLEVEL", "PARENTGUID", "ACTSTATUS",
|
||||
"CURRSTATUS"],
|
||||
"LIVESTATUS", "NEXTID"],
|
||||
"aoid",
|
||||
"Object")
|
||||
db_shemas['SOCRBASE'] = DbSchema("SOCRBASE", ["LEVEL", "SOCRNAME", "SCNAME", "KOD_T_ST"], "AddressObjectType")
|
||||
db_shemas['SOCRBASE'] = DbSchema("SOCRBASE", ["LEVEL", "SOCRNAME", "SCNAME", "KOD_T_ST"], "kod_t_st",
|
||||
"AddressObjectType")
|
||||
|
||||
allowed_tables = ["ADDROBJ", "SOCRBASE"]
|
||||
|
||||
Reference in New Issue
Block a user