working on backend
This commit is contained in:
@@ -18,6 +18,32 @@ def ensure_schema_updates(engine: Engine) -> None:
|
||||
"""Ensure missing columns are added for backward-compatible updates."""
|
||||
# Map of table -> {column: SQL type}
|
||||
updates: Dict[str, Dict[str, str]] = {
|
||||
# Billing batch history (lightweight persistence)
|
||||
"billing_batches": {
|
||||
"id": "INTEGER",
|
||||
"batch_id": "TEXT",
|
||||
"status": "TEXT",
|
||||
"total_files": "INTEGER",
|
||||
"successful_files": "INTEGER",
|
||||
"failed_files": "INTEGER",
|
||||
"started_at": "DATETIME",
|
||||
"updated_at": "DATETIME",
|
||||
"completed_at": "DATETIME",
|
||||
"processing_time_seconds": "FLOAT",
|
||||
"success_rate": "FLOAT",
|
||||
"error_message": "TEXT",
|
||||
},
|
||||
"billing_batch_files": {
|
||||
"id": "INTEGER",
|
||||
"batch_id": "TEXT",
|
||||
"file_no": "TEXT",
|
||||
"status": "TEXT",
|
||||
"error_message": "TEXT",
|
||||
"filename": "TEXT",
|
||||
"size": "INTEGER",
|
||||
"started_at": "DATETIME",
|
||||
"completed_at": "DATETIME",
|
||||
},
|
||||
# Forms
|
||||
"form_index": {
|
||||
"keyword": "TEXT",
|
||||
|
||||
Reference in New Issue
Block a user