7 Commits

Author SHA1 Message Date
00a0b3e14f Add --reimport and --reprocess-reactions CLI modes
Add flags to reimport all data from archived files or selectively
reprocess reactions. Also replace EnsureCreatedAsync with explicit
database/table existence checks for safer initialization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 23:20:25 -05:00
a281f7f1e7 Use export date from filename for archive subdirectory
Extract the date from filenames like "2026-01-20.json" instead of
using the current date, so archives are organized by export date
rather than processing date.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 23:20:17 -05:00
6f63f36df0 Improve import resilience with per-message saves and duplicate handling
Save after each message to isolate failures, catch and skip duplicate
key violations (SQL error 2601), and clear change tracker on rollback
to prevent cascading failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 23:20:08 -05:00
fbe52f72d6 Refactor reactions to track per-user instead of aggregate count
Replace Reaction.Count with UserId foreign key to User entity,
add unique index on (MessageId, EmojiName, UserId) to prevent
duplicates, and configure the User-Reactions relationship.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 23:19:59 -05:00
7896f9ef9a Fix duplicate reaction insertion error
- Add Unicode normalization for emoji names to handle encoding differences
- Check EF's local change tracker for pending reactions before insert
- Prevents DbUpdateException on unique index IX_Reactions_MessageId_EmojiName_UserId

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:37:53 -05:00
2da546fbd5 Add Gitea registry support and fix cross-device archiving
- Update docker-compose.yml to reference Gitea registry image
- Add docker-publish.cmd for building and pushing to Gitea
- Fix ArchiveService to handle cross-device moves by falling back
  to copy+delete when input and archive are on different volumes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:19:03 -05:00
2633bbf37a Initial commit
Add Discord Archive Manager project with:
- Entity Framework Core data models for Discord exports
- JSON import service for processing Discord chat exports
- Archive service for managing imported data
- Docker configuration for containerized deployment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:26:38 -05:00