Files
OSIT-AE-API-FastAPI/documentation/VIEWS_TO_REVIEW_FOR_ID_VISION.md
2026-02-19 17:56:08 -05:00

5.5 KiB

SQL Views Requiring Review for ID Vision Compliance

This document lists SQL views that have been identified as potentially missing id_random selections for related major objects. Those with lookup IDs are also included below. These views should be reviewed to ensure full compliance with the ID Vision standard, providing id_random for all referenced objects to improve performance and consistency in API responses.

IMPORTANT: This document is for review purposes only. Direct modification of SQL views should only be performed by Scott.


List of SQL views to review for missing _random variants:

  1. v_event_badge

    • Missing: lu_badge_type.id_random, lu_member_type.id_random, lu_member_status.id_random, lu_registration_type.id_random, lu_country_subdivision.id_random, lu_country.id_random
  2. v_event_exhibit

    • Missing: organization.id_random, contact.id_random, person.id_random (for person_id and poc_event_person_id), lu_event_exhibit_status.id_random
  3. v_event_exhibit_tracking

    • Missing: event_person_profile.id_random
  4. v_event_session

    • Missing: event_track.id_random
  5. v_event_session_w_file_count

    • Missing: event_track.id_random
  6. v_archive

    • Missing: address.id_random (for original_address_id), lu_archive_type.id_random
  7. v_archive_content

    • Missing: address.id_random (for original_address_id), hosted_file.id_random (for hosted_file_id), lu_archive_content_type.id_random, lu_media_type.id_random
  8. v_journal_entry

    • Missing: lu_journal_entry_type.id_random, topic.id_random, activity.id_random, billable_to.id_random
  9. v_post

    • Missing: person.id_random, user.id_random, lu_post_type.id_random, lu_post_topic.id_random
  10. v_post_comment

    • Missing: person.id_random, user.id_random

Medium priority

  1. v_activity_log
    • Missing: person.id_random, user.id_random
  2. v_address
    • Missing: organization.id_random, lu_country_subdivision.id_random, lu_country.id_random
  3. v_organization
    • Missing: user.id_random, person.id_random, lu_time_zone.id_random, lu_country_subdivision.id_random, lu_country.id_random
  4. v_person
    • Missing: lu_gender.id_random, lu_sexuality.id_random, lu_race.id_random, lu_ethnicity.id_random, lu_education_degree.id_random, lu_education_level.id_random, lu_time_zone.id_random, lu_country_subdivision.id_random, lu_country.id_random
  5. v_user
    • Missing: lu_user_status.id_random, address.id_random

Low priority

  1. v_event_badge_only

    • Missing: lu_badge_type.id_random, lu_member_type.id_random, lu_member_status.id_random, lu_registration_type.id_random, lu_country_subdivision.id_random, lu_country.id_random
  2. v_event_person_profile

    • Missing: contact.id_random, organization.id_random, hosted_file.id_random (for thumbnail_hosted_file_id, picture_hosted_file_id, about_hosted_file_id)
  3. v_event_person_tracking

    • Missing: event_person_profile.id_random
  4. v_post_detail

    • Missing: user.id_random, lu_post_type.id_random, lu_post_topic.id_random

Lookup tables

The lookup tables and views need to be dealt with differently. Lookup tables do not have the random string IDs and will likely never have them.

  1. v_lu_country
    • Missing: lu_country.id_random (its own id_random)
  2. v_lu_country_subdivision
    • Missing: lu_country_subdivision.id_random (its own id_random)
  3. v_lu_time_zone
    • Missing: lu_time_zone.id_random (its own id_random)
  4. v_lu_time_zone_cust
    • Missing: lu_time_zone.id_random (its own id_random)

Extremely low priority

They are not used at all right now and will not be used in the near future.

  1. v_sponsorship
    • Missing: organization.id_random, person.id_random (for person_id and poc_person_id), hosted_file.id_random (for logo_hosted_file_id)
  2. v_grant
    • Missing: product.id_random
  3. v_order
    • Missing: organization.id_random
  4. v_order_line
    • Missing: account.id_random (from the order joined to), product.id_random, lu_unit.id_random (for recurring period unit), lu_account_code.id_random, lu_account_code_deferred.id_random
  5. v_order_cart_line
    • Missing: account.id_random (from order_cart joined to), lu_vat.id_random
  6. v_product
    • Missing: lu_vat.id_random, lu_unit.id_random (for recurring unit), lu_account_code.id_random, lu_account_code_deferred.id_random
  7. v_membership_group
    • Missing: product.id_random, parent_membership_group.id_random, lu_membership_group_type.id_random
  8. v_membership_person
    • Missing: lu_membership_person_status.id_random, organization.id_random, contact.id_random, address.id_random (from membership_person_profile references); potentially old_membership_person_profile.id_random, old_membership_group.id_random, old_membership_type.id_random
  9. v_membership_person_profile
    • Missing: organization.id_random, contact.id_random, address.id_random (multiple types: address_id, address_billing_id, address_mailing_id, address_directory_id)
  10. v_membership_type
    • Missing: product.id_random, lu_membership_type_type.id_random
  11. v_membership_person_type
    • Missing: lu_membership_type_status.id_random