Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
|||||||||||||||
| practice_id | text | 2147483647 | null |
|
|
|||||||||||||||
| name | text | 2147483647 | null |
|
|
|||||||||||||||
| description | text | 2147483647 | √ | null |
|
|
||||||||||||||
| price_cents | int4 | 10 | null |
|
|
|||||||||||||||
| currency_code | bpchar | 3 | 'USD'::bpchar |
|
|
|||||||||||||||
| is_active | bool | 1 | true |
|
|
|||||||||||||||
| starts_at | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||
| expires_after_days | int4 | 10 | √ | null |
|
|
||||||||||||||
| created_at | timestamptz | 35,6 | now() |
|
|
|||||||||||||||
| updated_at | timestamptz | 35,6 | now() |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| package_definitions_pkey | Primary key | Asc | id |
| package_definitions_practice_active_idx | Performance | Asc/Asc | practice_id + is_active |
| package_definitions_practice_name_unique | Must be unique | Asc | practice_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| package_definitions_expires_after_days_check | (((expires_after_days IS NULL) OR (expires_after_days > 0))) |
| package_definitions_price_cents_check | ((price_cents >= 0)) |
| package_definitions_currency_code_check | ((currency_code ~ '^[A-Z]{3}$'::text)) |



