Skip to content

fix: stamp tickets.updated_at when a ticket is edited - #72

Draft
sonnymay wants to merge 1 commit into
mainfrom
claude/vibrant-meitner-r6rkke
Draft

sonnymay wants to merge 1 commit into
mainfrom
claude/vibrant-meitner-r6rkke

Conversation

@sonnymay

Copy link
Copy Markdown
Owner

Summary

schema.sql gives tickets.updated_at a default now(), but there's no update trigger, and PUT /tickets/{id} never set the column. As a result, updated_at always held the creation time. update_ticket now sets it to the current UTC time on every edit. Creating a ticket still uses the DB default.

No open PR (#17–#71) or issue touches updated_at. #45 and #47 also edit update_ticket/Ticket, so a small merge conflict is possible, but neither changes this logic.

Testing

  • Added test_update_ticket_sets_updated_at (checks for a tz-aware timestamp) and test_create_ticket_does_not_send_updated_at.
  • pytest: 45 passed (with SUPABASE_URL/SUPABASE_KEY set). ruff check and ruff format --check are clean.

Generated by Claude Code

schema.sql defines tickets.updated_at with default now() but no update
trigger, and PUT /tickets/{id} never set it, so the column always held
the creation time. update_ticket now sets it to the current UTC time on
every edit. Added tests for update (sets a tz-aware timestamp) and
create (leaves it to the DB default).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0171zWzjtpJq63QvkcDXeLGk
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
supportops Ready Ready Preview Nov 11, 2026 3:04pm UTC

This branch was successfully deployed

1 active deployment
Preview — db38e555 Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant