fix(db): make migrations and glossary index SQLite-compatible
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m57s

This commit is contained in:
2026-06-14 19:01:07 +02:00
parent cb8ce697d2
commit adc3583358
6 changed files with 93 additions and 35 deletions

View File

@@ -22,6 +22,14 @@ depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
conn = op.get_bind()
dialect = conn.dialect.name
if dialect == "sqlite":
# SQLite test databases are created fresh and have no legacy glossaries to clean up.
# The PostgreSQL-specific jsonb_object_keys logic is not needed here.
return
# 1. Delete old FR→EN glossaries that don't have multilingual translations
# (imported before enrichment, they are stale duplicates)
op.execute("""