catalog_items


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 gen_random_uuid()
catalog_item_location_pricing.catalog_item_id catalog_item_location_pricing_catalog_item_id_fkey C
catalog_item_lots.catalog_item_id catalog_item_lots_catalog_item_id_fkey C
catalog_item_provider_mappings.catalog_item_id catalog_item_provider_mappings_catalog_item_id_fkey C
practice_id text 2147483647 null
schema_migrations.id Implied Constraint R
kind text 2147483647 null
name text 2147483647 null
description text 2147483647 √ null
sku text 2147483647 √ null
upc text 2147483647 √ null
manufacturer_name text 2147483647 √ null
manufacturer_id text 2147483647 √ null
schema_migrations.id Implied Constraint R
service_code text 2147483647 √ null
service_duration_minutes int4 10 √ null
is_procedural bool 1 false
is_lot_tracked bool 1 false
is_taxable bool 1 false
is_active bool 1 true
is_deleted bool 1 false
legacy_item_id text 2147483647 √ null
schema_migrations.id Implied Constraint R
legacy_service_id text 2147483647 √ null
schema_migrations.id Implied Constraint R
legacy_practice_service_type_id text 2147483647 √ null
schema_migrations.id Implied Constraint R
legacy_fee_id text 2147483647 √ null
schema_migrations.id Implied Constraint R
legacy_item_type int4 10 √ null
legacy_payload jsonb 2147483647 '{}'::jsonb
metadata jsonb 2147483647 '{}'::jsonb
created_at timestamptz 35,6 now()
updated_at timestamptz 35,6 now()

Indexes

Constraint Name Type Sort Column(s)
catalog_items_pkey Primary key Asc id
catalog_items_legacy_fee_unique Must be unique Asc/Asc/Asc practice_id + kind + legacy_fee_id
catalog_items_legacy_item_unique Must be unique Asc/Asc/Asc practice_id + kind + legacy_item_id
catalog_items_legacy_service_idx Performance Asc/Asc/Asc practice_id + kind + legacy_service_id
catalog_items_practice_kind_active_idx Performance Asc/Asc/Asc practice_id + kind + is_active
catalog_items_practice_name_idx Performance Asc practice_id
catalog_items_sku_idx Performance Asc/Asc practice_id + sku
catalog_items_upc_idx Performance Asc/Asc practice_id + upc

Check Constraints

Constraint Name Constraint
catalog_items_kind_check ((kind = ANY (ARRAY['product'::text, 'service'::text, 'fee'::text])))
catalog_items_service_duration_minutes_check (((service_duration_minutes IS NULL) OR (service_duration_minutes > 0)))

Relationships