def is_legacy_sqlite(engine: Engine) -> bool:
    """Check if DB is an existing file-based SQLite created with the legacy
    `LocalSQLite` implementation.

    This database was removed since trulens 0.29.0 .
    """

    if engine.url.get_dialect().name != "sqlite":
        return False
    inspector = sql_inspect(engine)
    tables = list(inspector.get_table_names())

    if len(tables) == 0:
        # brand new db, not even initialized yet
        return False

    version_tables = [t for t in tables if t.endswith("alembic_version")]

    return len(version_tables) == 0
Check if DB is an existing file-based SQLite created with the legacy
    `LocalSQLite` implementation.

    This database was removed since trulens 0.29.0 .
    
src/core/trulens/core/database/utils.py