Skip to content

Commit

Permalink
feat: type equivalence work around
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrinson-rise8 committed Jan 21, 2025
1 parent bd40d67 commit 7bb9ccd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/recordlinker/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7bb9ccd

Please sign in to comment.