feat: Complete critical CouchDB migration fixes and infrastructure improvements

- Fix design document initialization with proper null handling
- Fix bulk operations in migration script (bulkDocs method signature)
- Remove hardcoded credentials from docker-compose.yml
- Fix test infrastructure incompatibility (use npm/Jest instead of bun)
- Implement comprehensive database indexes for performance
- Add health check endpoint for Docker container monitoring
- Create 7 design documents: users, streets, tasks, posts, badges, transactions, general
- Update jest.setup.js with proper mock exports
- Add .env.example with secure defaults

🤖 Generated with [AI Assistant]

Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
This commit is contained in:
William Valentin
2025-11-03 01:29:15 -08:00
parent c17019360c
commit 05c0075245
6 changed files with 60 additions and 30 deletions

View File

@@ -292,7 +292,7 @@ class MigrationService {
// Batch insert
if (transformedDocs.length > 0) {
const result = await couchdbService.bulkDocs({ docs: transformedDocs });
const result = await couchdbService.bulkDocs(transformedDocs);
// Count successful migrations
const successful = result.filter(r => r.ok).length;
@@ -490,7 +490,7 @@ class MigrationService {
];
if (allDocs.length > 0) {
const result = await couchdbService.bulkDocs({ docs: allDocs });
const result = await couchdbService.bulkDocs(allDocs);
const successful = result.filter(r => r.ok).length;
console.log(`✅ Successfully updated ${successful}/${allDocs.length} documents with relationship data`);
}