A community based topic aggregation platform built on atproto

feat: add database migration for comment namespace update

Add migration 018 to update all comment URIs from
social.coves.feed.comment to social.coves.community.comment.

Migration updates:
- comments.uri (main comment URIs)
- comments.root_uri (when root is a comment)
- comments.parent_uri (when parent is a comment)

Includes rollback support via -- +goose Down section for safe
reversibility. Since we're pre-production, only the comments table
is updated (votes table not affected).

Migration file: 018_migrate_comment_namespace.sql

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+34
+34
internal/db/migrations/018_migrate_comment_namespace.sql
··· 1 + -- +goose Up 2 + -- Migration: Update comment URIs from social.coves.feed.comment to social.coves.community.comment 3 + -- This updates the namespace for all comment records in the database. 4 + -- Since we're pre-production, we're only updating the comments table (not votes). 5 + 6 + -- Update main comment URIs 7 + UPDATE comments 8 + SET uri = REPLACE(uri, '/social.coves.feed.comment/', '/social.coves.community.comment/') 9 + WHERE uri LIKE '%/social.coves.feed.comment/%'; 10 + 11 + -- Update root references (when root is a comment, not a post) 12 + UPDATE comments 13 + SET root_uri = REPLACE(root_uri, '/social.coves.feed.comment/', '/social.coves.community.comment/') 14 + WHERE root_uri LIKE '%/social.coves.feed.comment/%'; 15 + 16 + -- Update parent references (when parent is a comment) 17 + UPDATE comments 18 + SET parent_uri = REPLACE(parent_uri, '/social.coves.feed.comment/', '/social.coves.community.comment/') 19 + WHERE parent_uri LIKE '%/social.coves.feed.comment/%'; 20 + 21 + -- +goose Down 22 + -- Rollback: Revert comment URIs from social.coves.community.comment to social.coves.feed.comment 23 + 24 + UPDATE comments 25 + SET uri = REPLACE(uri, '/social.coves.community.comment/', '/social.coves.feed.comment/') 26 + WHERE uri LIKE '%/social.coves.community.comment/%'; 27 + 28 + UPDATE comments 29 + SET root_uri = REPLACE(root_uri, '/social.coves.community.comment/', '/social.coves.feed.comment/') 30 + WHERE root_uri LIKE '%/social.coves.community.comment/%'; 31 + 32 + UPDATE comments 33 + SET parent_uri = REPLACE(parent_uri, '/social.coves.community.comment/', '/social.coves.feed.comment/') 34 + WHERE parent_uri LIKE '%/social.coves.community.comment/%';