summaryrefslogtreecommitdiffstats
path: root/internal/db/posts.go
Commit message (Collapse)AuthorAgeFilesLines
* feat: add RenamePost with transactional rename and redirect creationivar12 days1-0/+60
| | | | | | | | | | | | | | | Implement RenamePost method that atomically: 1. Fetches the post record by old slug 2. Inserts a new record with the new slug 3. Deletes the old slug post 4. Collapses redirect chains (updates any redirects pointing to oldSlug to point to newSlug) 5. Creates a redirect from oldSlug to newSlug All operations are transactional (all-or-nothing). Includes two comprehensive tests: - TestRenamePost: basic rename with redirect creation and old slug deletion - TestRenamePost_CollapsesChain: verifies redirect chains are collapsed correctly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add redirect DB methods (AddRedirect, GetRedirect, CollapseRedirects)ivar12 days1-0/+139