refactor(document): move document domain core to document/ package

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-05 12:39:20 +02:00
parent bb7d872a61
commit e85057bed2
2371 changed files with 385726 additions and 1971 deletions

26
scripts/reset-db.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -euo pipefail
CONTAINER="archive-db"
DB_USER="archive_user"
DB_NAME="family_archive_db"
echo "This will delete ALL documents, persons, and tags from the database."
read -rp "Type 'yes' to continue: " CONFIRM
[ "$CONFIRM" != "yes" ] && echo "Aborted." && exit 0
docker exec "$CONTAINER" psql -U "$DB_USER" -d "$DB_NAME" -c "
TRUNCATE transcription_block_versions CASCADE;
TRUNCATE transcription_blocks CASCADE;
TRUNCATE comment_mentions CASCADE;
TRUNCATE document_comments CASCADE;
TRUNCATE document_annotations CASCADE;
TRUNCATE document_versions CASCADE;
TRUNCATE notifications CASCADE;
TRUNCATE documents CASCADE;
TRUNCATE person_name_aliases CASCADE;
TRUNCATE persons CASCADE;
TRUNCATE tag CASCADE;
" --quiet
echo "Done. Database is clean."