Add in_progress column to existing databases that don't have it.
(engine)
| 197 | |
| 198 | |
| 199 | def _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 | |
| 212 | def _migrate_fix_null_boolean_fields(engine) -> None: |
no test coverage detected