You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 21, 2026. It is now read-only.
fix: Remove PostStatus/PostType INNER JOINs that break on CockroachDB IDs
The post_statuses seed migration lacks explicit IDs, so CockroachDB
assigns large unique_rowid() values. But blogStatuses() hardcodes
{POSTED=2, ...} and blog approval sets statusId=2, which matches no
actual post_statuses row. The include="PostStatus" INNER JOIN then
excludes every blog, causing show() to redirect to the list page.
Remove PostStatus and PostType from all include= clauses and use the
text status column in views instead of the association.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
where ="blog_posts.status ='Approved' AND blog_posts.publishedAt IS NOT NULL AND blog_posts.publishedAt <= '#Now()#' AND (blog_posts.slug LIKE :pattern OR blog_posts.title LIKE :pattern OR blog_posts.content LIKE :pattern OR fullname LIKE :pattern OR email LIKE :pattern)",
where ="blog_posts.status ='Approved' AND blog_posts.publishedAt IS NOT NULL AND blog_posts.publishedAt <= '#Now()#' AND (blog_posts.slug LIKE :pattern OR blog_posts.title LIKE :pattern OR blog_posts.content LIKE :pattern OR fullname LIKE :pattern OR email LIKE :pattern)",
0 commit comments