MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / _migrate_add_in_progress_column

Function _migrate_add_in_progress_column

api/database.py:199–209  ·  view source on GitHub ↗

Add in_progress column to existing databases that don't have it.

(engine)

Source from the content-addressed store, hash-verified

197
198
199def _migrate_add_in_progress_column(engine) -> None:
200 """Add in_progress column to existing databases that don't have it."""
201 with engine.connect() as conn:
202 # Check if column exists
203 result = conn.execute(text("PRAGMA table_info(features)"))
204 columns = [row[1] for row in result.fetchall()]
205
206 if "in_progress" not in columns:
207 # Add the column with default value
208 conn.execute(text("ALTER TABLE features ADD COLUMN in_progress BOOLEAN DEFAULT 0"))
209 conn.commit()
210
211
212def _migrate_fix_null_boolean_fields(engine) -> None:

Callers 1

create_databaseFunction · 0.85

Calls 1

connectMethod · 0.80

Tested by

no test coverage detected