Skip to content

Commit

Permalink
Change name of internal to allow.
Browse files Browse the repository at this point in the history
Can find and delete old ones like so:
SELECT COUNT(*) from pg_indexes WHERE indexname LIKE '%internal%' AND indexname NOT LIKE '%internalv2%';
  • Loading branch information
bctcvai committed Jun 16, 2023
1 parent 4a24e76 commit ff3039e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/main/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def _get_unique_index_name(entity_type, attribute):
# Native fields are only scoped to project, native-string types are project/type bound
# Both need to incorporate type name in the name for uniqueness.
if attribute['dtype'] == 'native':
index_name=f"tator_proj_{entity_type.project.id}_{type_name_sanitized}_internal_{attribute_name_sanitized}"
index_name=f"tator_proj_{entity_type.project.id}_{type_name_sanitized}_internalv2_{attribute_name_sanitized}"
else:
index_name=f"tator_proj_{entity_type.project.id}_{type_name_sanitized}_internal_{entity_name_sanitized}_{attribute_name_sanitized}"
index_name=f"tator_proj_{entity_type.project.id}_{type_name_sanitized}_internalv2_{entity_name_sanitized}_{attribute_name_sanitized}"
else:
index_name=f"tator_proj_{entity_type.project.id}_{type_name_sanitized}_{entity_name_sanitized}_{attribute_name_sanitized}"
return index_name
Expand Down

0 comments on commit ff3039e

Please sign in to comment.