- Synchronized searchable_fields (V3 whitelists) across all Primary and Active AE objects (Identity, People, Events, Journals, Posts, Archives, Business).
- Standardized Pydantic models for core objects to include the 10 common fields (id, id_random, enable, hide, priority, sort, group, notes, created_on, updated_on).
- Fixed field aliases and uncommented valid database columns in User_Base and Organization_Base.
- Pruned non-existent fields from searchable lists in legacy or config-specific definitions (account_cfg, user_role, log_client_viewing).
- Added system discovery and validation tools:
- ae_object_info.py: AE object status and metadata browser.
- export_all_interfaces.py: E2E TypeScript interface generator.
- Verification scripts for searchable field consistency.
- Updated Jan 8 milestone progress and platform roadmap in GEMINI.md.
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
import sys
|
|
import os
|
|
import json
|
|
from sqlalchemy import text
|
|
|
|
# Setup path to include the app directory
|
|
sys.path.append(os.getcwd())
|
|
|
|
def verify_all():
|
|
try:
|
|
from app.ae_obj_types_def import obj_type_kv_li
|
|
from app.db_connection import engine
|
|
except ImportError as e:
|
|
print(f"Error importing dependencies: {e}")
|
|
return
|
|
|
|
for obj_type, def_kv in obj_type_kv_li.items():
|
|
if obj_type != 'activity_log': continue
|
|
|
|
searchable_fields = def_kv.get('searchable_fields', [])
|
|
table_name = def_kv.get('tbl_default') or def_kv.get('tbl')
|
|
|
|
db_valid_fields = set()
|
|
if table_name:
|
|
try:
|
|
with engine.connect() as conn:
|
|
# Use a standard SQL query to get column names
|
|
result = conn.execute(text(f"SHOW COLUMNS FROM `{table_name}`"))
|
|
for row in result:
|
|
db_valid_fields.add(row[0])
|
|
except Exception as e:
|
|
print(f"DB Error for {table_name}: {e}")
|
|
|
|
print(f"Object: {obj_type}")
|
|
print(f"Table: {table_name}")
|
|
print(f"Fields: {db_valid_fields}")
|
|
|
|
if __name__ == "__main__":
|
|
verify_all()
|