shinkan-jinkendo/backend
Lars 97a7fe7cba
Some checks failed
Deploy Development / deploy (push) Successful in 54s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m55s
fix: reimport dict-cursor bug + add admin cleanup endpoint
Problem 1: Reimport fails completely (all exercises fail)
Root cause: Line 465 existing[0] instead of existing['id']
Fix: Changed to existing['id'] for dict-cursor compatibility

Problem 2: 221 exercises skipped, only 2 in database
Root cause: Orphaned wiki_import_references from failed imports
Fix: New admin endpoint to manually cleanup orphaned references

New endpoints:
- DELETE /api/import/mediawiki/admin/cleanup-orphaned-references
  Deletes all references where local_id doesn't exist in target table
  Returns count of deleted references per type

- GET /api/import/mediawiki/admin/stats
  Shows references vs. actual count + orphaned count
  Helps diagnose import state issues

Usage:
1. Call cleanup endpoint to remove orphaned references
2. Run normal import (reimport=false)
3. Should import all previously failed exercises
2026-04-27 08:52:05 +02:00
..
migrations fix: make exercise goal and execution optional (at least one required) 2026-04-24 20:42:21 +02:00
routers fix: reimport dict-cursor bug + add admin cleanup endpoint 2026-04-27 08:52:05 +02:00
auth.py fix: Remove Mitai-specific columns from session query 2026-04-22 06:56:57 +02:00
db_init.py feat: Initial Shinkan setup 2026-04-21 14:26:12 +02:00
db.py feat: Initial Shinkan setup 2026-04-21 14:26:12 +02:00
Dockerfile feat: Complete MVP setup - Docker, Frontend, Migrations, CI/CD 2026-04-21 14:36:52 +02:00
main.py fix: reimport dict-cursor bug + add admin cleanup endpoint 2026-04-27 08:52:05 +02:00
models.py fix: Add ProfileCreate and ProfileUpdate models 2026-04-21 16:05:42 +02:00
requirements.txt feat: Initial Shinkan setup 2026-04-21 14:26:12 +02:00
run_migrations.py feat: Add automatic migrations system 2026-04-21 14:49:28 +02:00
smw_client.py feat: add recursive subcategory search for MediaWiki import 2026-04-24 17:53:11 +02:00
smw_mapper.py feat: Add MediaWiki import functionality with tracking and mapping 2026-04-24 14:41:52 +02:00
version.py feat: Exercises v2.0 + Migrations 014/016/017 (Clean-Room Rebuild) 2026-04-24 15:04:27 +02:00