Debug
This commit is contained in:
parent
809b256e5b
commit
b9307ce566
1 changed files with 7 additions and 17 deletions
|
|
@ -45,26 +45,16 @@ def get_element_identifier(item):
|
|||
item.get('TRIGGER_NAME')
|
||||
)
|
||||
|
||||
# --- FUNÇÃO AUXILIAR PARA COMPARAÇÃO DE CAMPOS (Mantida) ---
|
||||
|
||||
# --- FUNÇÃO AUXILIAR PARA COMPARAÇÃO DE CAMPOS (Omitida, pois não é chamada) ---
|
||||
def compare_fields(standard_fields: List[Dict], client_fields: List[Dict], table_name: str) -> List[Dict]:
|
||||
"""
|
||||
Compara os campos de uma tabela entre as estruturas padrão e cliente.
|
||||
"""
|
||||
# NOTE: Esta função não é usada no fluxo atual de retorno, mas é mantida por completude.
|
||||
discrepancies = []
|
||||
# ... (implementação omitida)
|
||||
return discrepancies
|
||||
pass
|
||||
|
||||
# --- FUNÇÃO PRINCIPAL DE COMPARAÇÃO DE ESTRUTURAS (Mantida para fins de contexto, mas não chamada no execute) ---
|
||||
# --- FUNÇÃO PRINCIPAL DE COMPARAÇÃO DE ESTRUTURAS (Omitida, pois não é chamada) ---
|
||||
def compare_structures(standard_structure: Dict[str, Any], client_structure: Dict[str, Any]) -> Dict[str, Any]:
|
||||
# NOTE: Esta função não é usada no fluxo atual de retorno, mas é mantida por completude.
|
||||
audit_log = {}
|
||||
# ... (implementação omitida)
|
||||
return audit_log
|
||||
pass
|
||||
|
||||
|
||||
# --- NOVA FUNÇÃO: ELEMENTOS SOMENTE NO CLIENTE ---
|
||||
# --- FUNÇÃO: ELEMENTOS SOMENTE NO CLIENTE ---
|
||||
|
||||
def find_client_only_elements(standard_structure: Dict[str, Any], client_structure: Dict[str, Any]) -> Dict[str, Any]:
|
||||
"""
|
||||
|
|
@ -92,9 +82,9 @@ def find_client_only_elements(standard_structure: Dict[str, Any], client_structu
|
|||
# 1c. Encontra Tabelas Exclusivas do Cliente
|
||||
client_tables_names = set(client_fields_by_table.keys())
|
||||
|
||||
client_only_tables = []
|
||||
unique_table_names = client_tables_names - standard_tables_names
|
||||
|
||||
client_only_tables = []
|
||||
for table_name in unique_table_names:
|
||||
# Retorna a lista de campos agrupados sob o nome da tabela (limpa)
|
||||
client_only_tables.append({
|
||||
|
|
@ -190,7 +180,7 @@ class ShowDatabaseService:
|
|||
debug_cliente = self._clean_full_structure_for_output(client_structure)
|
||||
debug_padrao = self._clean_full_structure_for_output(standard_structure_data)
|
||||
|
||||
# NOVO: Encontra elementos exclusivos do cliente (Cliente - Padrão)
|
||||
# Encontra elementos exclusivos do cliente (Cliente - Padrão)
|
||||
elementos_unicos_cliente = find_client_only_elements(
|
||||
standard_structure_data,
|
||||
client_structure
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue