chat_histories.project_id was referencing projects(id) which is a bigserial, causing an error when trying to insert with a UUID project reference.
Fix
migrations/019_fix_chat_histories_fk.sql — drops and recreates the FK constraint pointing to projects(guid) on existing deployments
migrations/018_chat_histories.sql — corrected for fresh installs
Fixes #2
## Problem
`chat_histories.project_id` was referencing `projects(id)` which is a `bigserial`, causing an error when trying to insert with a UUID project reference.
## Fix
- `migrations/019_fix_chat_histories_fk.sql` — drops and recreates the FK constraint pointing to `projects(guid)` on existing deployments
- `migrations/018_chat_histories.sql` — corrected for fresh installs
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.
Removed migration 019 — since the table was dropped manually, 018_chat_histories.sql (now with the correct projects(guid) FK) will recreate it cleanly on the next migration run.
Removed migration 019 — since the table was dropped manually, `018_chat_histories.sql` (now with the correct `projects(guid)` FK) will recreate it cleanly on the next migration run.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #2
Problem
chat_histories.project_idwas referencingprojects(id)which is abigserial, causing an error when trying to insert with a UUID project reference.Fix
migrations/019_fix_chat_histories_fk.sql— drops and recreates the FK constraint pointing toprojects(guid)on existing deploymentsmigrations/018_chat_histories.sql— corrected for fresh installsNo need for the fix in migrations/019_fix_chat_histories_fk.sql . I dropped the bugged table manually.
Removed migration 019 — since the table was dropped manually,
018_chat_histories.sql(now with the correctprojects(guid)FK) will recreate it cleanly on the next migration run.