claude-memory/graph/solutions/postgresql-migration-workflow-for-major-domo-4f3d29.md
Cal Corum b140d4d82a migrate: 313 memories from MemoryGraph
- 313 new markdown files created
- 30 relationships embedded
- 313 entries indexed
- State initialized with usage data
2026-02-13 11:11:48 -06:00

983 B

id type title tags importance confidence created updated
4f3d2923-25af-4548-85ae-df7285fa129d solution PostgreSQL migration workflow for Major Domo
major-domo
postgresql
migrations
docker
workflow
0.7 0.8 2025-12-09T22:44:52.229579+00:00 2025-12-09T22:44:52.229579+00:00

Manual migration workflow for Major Domo database:

  1. Create SQL file in migrations/ with timestamp: YYYY-MM-DD_description.sql
  2. Update Peewee model in app/db_engine.py to match
  3. Apply via SSH to dev server (10.10.0.42): ssh 10.10.0.42 "docker exec -i sba_postgres psql -U sba_admin -d sba_master -c 'SQL HERE'"
  4. Production is on Akamai Linode (ssh akamai, cd container-data/sba-database)

Key gotchas:

  • Table names are SINGULAR (team, player, etc.) not plural
  • Container name is sba_postgres (underscore, not hyphen)
  • No psql on local machine - must SSH and use docker exec
  • Use IF NOT EXISTS for idempotent migrations
  • Peewee FloatField maps to PostgreSQL REAL type