Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | serial | 10 | √ | nextval('acq.purchase_order_id_seq'::regclass) |
|
|
||||||||||||||||||||
| owner | int4 | 10 | null |
|
|
|||||||||||||||||||||
| creator | int4 | 10 | null |
|
|
|||||||||||||||||||||
| editor | int4 | 10 | null |
|
|
|||||||||||||||||||||
| ordering_agency | int4 | 10 | null |
|
|
|||||||||||||||||||||
| create_time | timestamptz | 35,6 | now() |
|
|
|||||||||||||||||||||
| edit_time | timestamptz | 35,6 | now() |
|
|
|||||||||||||||||||||
| provider | int4 | 10 | null |
|
|
|||||||||||||||||||||
| state | text | 2147483647 | 'new'::text |
|
|
|||||||||||||||||||||
| order_date | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||||||||
| name | text | 2147483647 | null |
|
|
|||||||||||||||||||||
| cancel_reason | int4 | 10 | √ | null |
|
|
||||||||||||||||||||
| prepayment_required | bool | 1 | false |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| purchase_order_pkey | Primary key | Asc | id |
| acq_po_org_name_order_date_idx | Performance | Asc/Asc/Asc | ordering_agency + name + order_date |
| po_creator_idx | Performance | Asc | creator |
| po_editor_idx | Performance | Asc | editor |
| po_owner_idx | Performance | Asc | owner |
| po_provider_idx | Performance | Asc | provider |
| po_state_idx | Performance | Asc | state |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| valid_po_state | ((state = ANY (ARRAY['new'::text, 'pending'::text, 'on-order'::text, 'received'::text, 'cancelled'::text]))) |
