diff --git a/app/routes/debug_fb.py b/app/routes/debug_fb.py index 27bff97..363df62 100644 --- a/app/routes/debug_fb.py +++ b/app/routes/debug_fb.py @@ -23,6 +23,15 @@ async def find_cups(request: Request, user: dict = Depends(get_current_user)): results = {} + # 0. Tablas/campos que contengan "CUP" + ok0, _, rows0 = fb.execute_query(""" + SELECT TRIM(f.RDB$RELATION_NAME) AS tabla, TRIM(f.RDB$FIELD_NAME) AS campo + FROM RDB$RELATION_FIELDS f + WHERE f.RDB$FIELD_NAME LIKE '%CUP%' + ORDER BY 1, 2 + """) + results["campos_cup_en_bd"] = rows0 if ok0 else [] + # 1. Columnas de ARTICULO ok1, err1, rows1 = fb.execute_query(""" SELECT TRIM(f.RDB$FIELD_NAME) AS campo