From 7bb9ccd739683331f15866357e95e6e01878356f Mon Sep 17 00:00:00 2001 From: cason Date: Tue, 21 Jan 2025 12:28:10 -0500 Subject: [PATCH] feat: type equivalence work around --- src/recordlinker/database/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/recordlinker/database/__init__.py b/src/recordlinker/database/__init__.py index 7bc8ad75..b495378b 100644 --- a/src/recordlinker/database/__init__.py +++ b/src/recordlinker/database/__init__.py @@ -40,9 +40,12 @@ def are_types_equivalent(db_type, orm_type) -> bool: db_type_str = str(db_type).lower() orm_type_str = str(orm_type).lower() - # Treat INTEGER and BIGINT as equivalent + # Treat these cases as equivalent if {db_type_str, orm_type_str} <= {"integer", "bigint"}: return True + + if {db_type_str, orm_type_str} <= {"double precision", "float"}: + return True return db_type_str == orm_type_str