--- id: 03a346c2-6540-4648-b8c7-b6a312f7d54e type: fix title: "PostgreSQL migration: DateTimeField defaults must be datetime objects" tags: [paper-dynasty, postgresql, migration, fix, peewee] importance: 0.8 confidence: 0.8 created: "2026-01-31T21:56:25.802935+00:00" updated: "2026-01-31T21:56:25.802935+00:00" --- Paperdex and GauntletRun models had DateTimeField(default=int(datetime.timestamp(...)*1000)) which worked in SQLite but fails in PostgreSQL with 'column is of type timestamp without time zone but expression is of type bigint'. Fix: Use DateTimeField(default=datetime.now) instead. Files: app/db_engine.py and db_engine.py