Files
ALwrity/backend/check_cols.py
ajaysi 9713af0c1b fix: Add missing columns to daily_workflow_plans table
- Added generation_mode column (VARCHAR, default: 'llm_generation')
- Added committee_agent_count column (INTEGER, default: 0)
- Added fallback_used column (BOOLEAN, default: 0)

Also fixed:
- Imported daily_workflow_models in services/database.py to ensure models are registered
- Added _create_daily_workflow_tables() to database setup
- Created migration script to add columns to 35 existing databases
- Fixed WorkflowError type in frontend to use constructor for proper 'name' property

This resolves the 'no such column' sqlite3 errors when accessing the today-workflow API.
2026-03-09 16:25:56 +05:30

16 lines
461 B
Python

import sqlite3
import os
db_path = r'workspace/workspace_user_33Gz1FPI86VDXhRY8QN4ragRFGN/db/alwrity_user_33Gz1FPI86VDXhRY8QN4ragRFGN.db'
if os.path.exists(db_path):
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
cursor.execute("PRAGMA table_info(daily_workflow_plans)")
cols = cursor.fetchall()
col_names = [c[1] for c in cols]
print("Columns:", col_names)
conn.close()
else:
print(f"Database not found at {db_path}")