Commit 2b1bd7f
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
File tree
39 files changed
+62
-6704
lines changed- claudedocs
- codeframe
- lib
- persistence
- migrations
- archive
- tasks
- scripts
- tests
- agents
- blockers
- core
- integration
- persistence
39 files changed
+62
-6704
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
| |||
This file was deleted.
0 commit comments