fix(db): make migrations and glossary index SQLite-compatible
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m57s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m57s
This commit is contained in:
@@ -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("""
|
||||
|
||||
Reference in New Issue
Block a user