<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nebbet.no/internal/db/posts.go, branch main</title>
<subtitle>[no description]</subtitle>
<id>https://git.ivar.systems/nebbet.no/atom?h=main</id>
<link rel='self' href='https://git.ivar.systems/nebbet.no/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.ivar.systems/nebbet.no/'/>
<updated>2026-04-04T14:36:18Z</updated>
<entry>
<title>fix: make slug rename and content update atomic via RenameAndUpsertPost</title>
<updated>2026-04-04T14:36:18Z</updated>
<author>
<name>ivar</name>
<email>i@oiee.no</email>
</author>
<published>2026-04-04T14:36:18Z</published>
<link rel='alternate' type='text/html' href='https://git.ivar.systems/nebbet.no/commit/?id=0d8f53520a2143b22e2246ab1ec25e0860e90dad'/>
<id>urn:sha1:0d8f53520a2143b22e2246ab1ec25e0860e90dad</id>
<content type='text'>
Previously RenamePost + UpsertPost were two separate DB calls; a failure
between them left the post at the new slug with stale content. The new
RenameAndUpsertPost method does both in a single transaction.

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix: guard RenamePost against self-rename (noop)</title>
<updated>2026-04-04T14:12:29Z</updated>
<author>
<name>ivar</name>
<email>i@oiee.no</email>
</author>
<published>2026-04-04T14:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.ivar.systems/nebbet.no/commit/?id=8b137242305bb2a39f580d994392ece195aacf3b'/>
<id>urn:sha1:8b137242305bb2a39f580d994392ece195aacf3b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: add RenamePost with transactional rename and redirect creation</title>
<updated>2026-04-04T14:10:52Z</updated>
<author>
<name>ivar</name>
<email>i@oiee.no</email>
</author>
<published>2026-04-04T14:10:52Z</published>
<link rel='alternate' type='text/html' href='https://git.ivar.systems/nebbet.no/commit/?id=f045a49e6feb6f448faea073821a9661f8b710a3'/>
<id>urn:sha1:f045a49e6feb6f448faea073821a9661f8b710a3</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>feat: add redirect DB methods (AddRedirect, GetRedirect, CollapseRedirects)</title>
<updated>2026-04-04T14:08:50Z</updated>
<author>
<name>ivar</name>
<email>i@oiee.no</email>
</author>
<published>2026-04-04T14:08:50Z</published>
<link rel='alternate' type='text/html' href='https://git.ivar.systems/nebbet.no/commit/?id=d239993644aae8c29d5fc37e8c6209850140807c'/>
<id>urn:sha1:d239993644aae8c29d5fc37e8c6209850140807c</id>
<content type='text'>
</content>
</entry>
</feed>
