--- id: b5f56d48-32b5-46b9-8609-e20a4aa3ac28 type: solution title: "Paper Dynasty PostgreSQL Migration Complete" tags: [paper-dynasty, postgresql, migration, docker, akamai] importance: 0.9 confidence: 0.8 created: "2026-01-30T19:57:07.847397+00:00" updated: "2026-01-30T19:57:07.847397+00:00" relations: - target: 4bb882a6-1ef9-4ec4-873d-816881f6670b type: BUILDS_ON direction: incoming strength: 0.5 --- Successfully migrated Paper Dynasty from SQLite to PostgreSQL on akamai. Key details: - Database: pd_master on sba_postgres container (shared with SBA) - User: pd_admin / wJHZRZbO5NJBjhGfqydsZueV - API container: pd_api on port 8002, proxied via pd.manticorum.com - API token: Tp3aO3jhYve5NJF1IqOmJTmk - Networks: sba-database_default + nginx-proxy-manager_npm_network Migration issues resolved: 1. Initial migration missed ~10k packs due to transaction rollback bug - fixed with autocommit=True 2. Pack id=1 placeholder needed for new card creation (default FK) 3. /legal-check endpoint needed fix to parse stringified list card_ids 4. ~3.5k orphaned cards (AI teams only) not migrated - expected data cleanup Container startup command preserved in deployment.