Skip to content

Commit 2b1bd7f

Browse files
authored
refactor: Remove deprecated database migration system (#142)
* refactor: Remove deprecated database migration system The migration system has been deprecated in favor of a flattened v1.0 schema. All historical migrations have been incorporated into the Database._create_schema() method. Changes: - Remove _run_migrations() method from database.py - Remove run_migrations parameter from Database.initialize() - Delete entire migrations/ directory and infrastructure - Delete migration-specific test files (6 files) - Remove run_migrations parameter usage from all test files - Delete migration verification script - Update documentation to reflect flattened schema approach - Update deployment script to reference schema initialization All tests passing (34/34 in test suite sample). Rationale: The flattened schema approach is simpler for pre-production development and eliminates the complexity of managing migrations. The complete schema is now defined in one place (_create_schema) making it easier to understand and maintain. * chore(docs) remove old and outdated analysis documentation * fix: Remove stale migration references from code and tests Address code review feedback: 1. database.py: - Updated error messages to remove references to non-existent migration 011 - Changed "after migration 011" to "enforced by schema" - Updated error messages to clarify schema-level enforcement 2. test_database_typed_returns.py: - Removed misleading `db_no_migrations` fixture - Replaced complex NULL validation tests with simpler schema constraint tests - Renamed TestNullCreatedAtValidation to TestCreatedAtSchemaConstraint - Tests now verify that the schema prevents NULL values (instead of trying to insert them) - Removed all references to migration 011 All 17 tests passing.
1 parent f9535ea commit 2b1bd7f

39 files changed

+62
-6704
lines changed

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Quick reference:
3838
└── docs/ # Additional documentation
3939
```
4040

41-
NOTE: This is a pre-production application, so there is no need for database migration scripting or backward compatibility. Keep the schema flat as much as possible.
41+
NOTE: This is a pre-production application with a flattened v1.0 database schema. The schema uses direct table creation with no migration system.
4242

4343
## Commands
4444
```bash
@@ -93,7 +93,7 @@ python scripts/quality-ratchet.py show
9393
* **Before**: One project per agent (broken architecture)
9494
* **After**: Multiple agents (orchestrator, backend, frontend, test, review) collaborate on same project
9595
* **Tests**: 59/59 passing (100%) - Full multi-agent test coverage
96-
* Phase 2: Foundational layer (Pydantic models, migrations, database methods, TokenCounter)
96+
* Phase 2: Foundational layer (Pydantic models, database methods, TokenCounter)
9797
* Phase 3: Context item storage (save/load/get context with persistence)
9898
* Phase 4: Importance scoring with hybrid exponential decay algorithm (T027-T036)
9999
* Phase 5: Automatic tier assignment HOT/WARM/COLD (T037-T043, T046)

CODEFRAME_ISSUES_ANALYSIS.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ CodeFRAME is an ambitious AI-powered software development system with a comprehe
137137
- **Impact**: Users cannot understand how to use the system
138138
- **Evidence**: Missing OpenAPI specs and docstrings
139139

140-
#### Missing Migration Documentation
141-
- **Issue**: Database migration system is documented but incomplete
142-
- **Location**: `codeframe/persistence/migrations/README.md`
143-
- **Impact**: Database schema changes are difficult to manage
144-
- **Evidence**: Template migration files with XXX placeholders
145-
146140
## Specific Functionality Gaps
147141

148142
### Agent System Issues

E2E_PLAYWRIGHT_FAILURE_ANALYSIS.md

Lines changed: 0 additions & 245 deletions
This file was deleted.

0 commit comments

Comments
 (0)