claude-memory/graph/solutions/postgresql-excluded-column-name-fix-for-peewee-upserts-dd5971.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

584 B

id type title tags importance confidence created updated
dd597163-635b-4408-a209-54a33c0732e5 solution PostgreSQL EXCLUDED column name fix for Peewee upserts
paper-dynasty
postgresql
peewee
upsert
fix
0.8 0.8 2026-01-30T23:28:53.941663+00:00 2026-01-30T23:28:53.941663+00:00

When using Peewee's on_conflict() with EXCLUDED for PostgreSQL, must use the actual column_name not the field name. ForeignKeyFields have column names ending in _id (e.g., field 'batter' -> column 'batter_id'). Fix: EXCLUDED[field_obj.column_name] instead of EXCLUDED[field_name]