Fixes #2 — project_id on chat_histories was referencing projects(id) (bigserial) instead of projects(guid) (uuid). Added migration 019 to repair existing deployments and corrected 018 for fresh installs.