added encryption

This commit is contained in:
2026-03-09 10:54:07 +05:30
parent 6e184dc590
commit 6720e28d08
27 changed files with 2093 additions and 709 deletions

View File

@@ -92,6 +92,7 @@ python scripts/migrate_data.py
**Script Output:**
The script will:
1. Report duplicate users found
2. Map old duplicate user IDs to the canonical (oldest) user
3. Update all entries to reference the canonical user
@@ -292,6 +293,7 @@ npm run dev # or your dev command
```
Test the full application:
- Login via Google
- Create an entry
- View entries in history
@@ -320,6 +322,7 @@ This will revert the database to its pre-migration state.
**Cause:** Some entries still have string userId references.
**Fix:** Re-run the migration script:
```bash
python backend/scripts/migrate_data.py
```
@@ -328,6 +331,7 @@ python backend/scripts/migrate_data.py
**Cause:** userId is still a string in old entries.
**Fix:** Check the entry structure:
```bash
mongosh --db grateful_journal
db.entries.findOne() # Check userId type
@@ -339,6 +343,7 @@ If userId is a string, run migration again.
**Cause:** Index creation failed due to duplicate emails.
**Fix:** The migration script handles this, but if you hit this:
```bash
# Rerun migration
python scripts/migrate_data.py