Docs: Consolidate admin documentation and migrate reference data
- Created LOCAL_DEVELOPMENT_GUIDE.md and DEPLOYMENT_GUIDE_MANUAL.md from legacy txt files. - Migrated country/time_zone data and requirements.txt to documentation/reference_data/. - Removed redundant admin/documentation/ and admin/data_files/ directories. - Enhanced app/lib_schema_v3.py to explicitly capture 'required' fields from DB 'NOT NULL' constraint. - Added verification tests for schema logic and standalone DB connectivity.
This commit is contained in:
@@ -38,9 +38,15 @@ def get_object_schema_info(obj_type: str, view: str = 'default', variant: str =
|
||||
try:
|
||||
db_result = db.execute(text(f"DESCRIBE `{table_name}`"))
|
||||
for row in db_result.fetchall():
|
||||
# row format: (Field, Type, Null, Key, Default, Extra)
|
||||
schema_info["database"]["columns"].append({
|
||||
"field": row[0], "type": row[1], "nullable": row[2] == 'YES',
|
||||
"key": row[3], "default": row[4], "extra": row[5]
|
||||
"field": row[0],
|
||||
"db_type": row[1],
|
||||
"nullable": row[2] == 'YES',
|
||||
"required": row[2] == 'NO', # Explicitly capture NOT NULL
|
||||
"key": row[3],
|
||||
"db_default": row[4],
|
||||
"extra": row[5]
|
||||
})
|
||||
except Exception as e:
|
||||
schema_info["database"]["error"] = str(e)
|
||||
|
||||
Reference in New Issue
Block a user