Adds schema_versions table and migrations.py runner to prevent
double-application and missed migrations across dev/prod environments.
- migrations/2026-03-27_add_schema_versions_table.sql: creates tracking table
- migrations.py: applies pending .sql files in sorted order, records each in schema_versions
- .gitignore: untrack migrations.py (was incorrectly ignored as legacy root file)
First run on an existing DB will apply all migrations (safe — all use IF NOT EXISTS).
Closes#81
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removed obsolete files after PostgreSQL migration:
Legacy Python Code:
- main.py (319 KB) - Replaced by app/main.py
- db_engine.py (68 KB) - Replaced by app/db_engine.py
- migrations.py - Old Peewee migrations, now using SQL migrations
Database Files:
- pd_master.db (74 MB) - Old SQLite database
- test-storage/pd_master.db (74 MB) - Duplicate test database
- test-storage/sba_is_fun.db (270 KB) - Old test database
Development Documentation:
- data_consistency_check.py
- DATA_CONSISTENCY_REPORT.md
- REFACTOR_DOCUMENTATION.md
Miscellaneous:
- Dockerfile.optimized - Alternative Dockerfile not in use
- =2.9.0 - Artifact file
- test-storage/ - Old test data
All files backed up to: /tmp/major-domo-database-legacy-backup/
Total: 10,444 lines deleted, ~179 MB freed
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>