fix: remove non-existent auth_apiname from uapi query, add error handling
This commit is contained in:
parent
29a397bbf4
commit
f0bf47881b
@ -31,11 +31,15 @@ async def generate_migration_sql():
|
||||
]
|
||||
|
||||
# Load data
|
||||
async with db.sqlorContext(dbname) as sor:
|
||||
# Get all upapps
|
||||
upapps = await sor.sqlExe('select id, name, apisetid from upapp', {})
|
||||
# Get all uapis
|
||||
uapis = await sor.sqlExe('select id, apisetid, name, httpmethod, path, headers, ioid, auth_apiname, response, params, data, chunk_match from uapi', {})
|
||||
try:
|
||||
async with db.sqlorContext(dbname) as sor:
|
||||
# Get all upapps
|
||||
upapps = await sor.sqlExe('select id, name, apisetid from upapp', {})
|
||||
# Get all uapis (removed non-existent auth_apiname field)
|
||||
uapis = await sor.sqlExe('select id, apisetid, name, httpmethod, path, headers, ioid, response, params, data, chunk_match from uapi', {})
|
||||
except Exception as e:
|
||||
print(f"Error querying database: {e}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
# Build mapping: apisetid -> [upapp1, upapp2, ...]
|
||||
apiset_to_upapps = {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user