room_documents


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 nextval('room_documents_id_seq'::regclass)
room_id text 2147483647 null
deal_rooms.id room_documents_room_id_fkey C
scan_id int8 19 null
document_kind text 2147483647 null
document_type text 2147483647 'violations'::text
file_path text 2147483647 null
file_bytes int8 19 null
sha256 text 2147483647 null
room_url text 2147483647 null
room_password text 2147483647 null
findings_total int4 10 0
findings_shown int4 10 0
findings_locked int4 10 0
findings_citable int4 10 0
generated_at timestamptz 35,6 now()

Indexes

Constraint Name Type Sort Column(s)
room_documents_pkey Primary key Asc id
idx_room_documents_kind Performance Asc document_kind
idx_room_documents_room Performance Asc/Desc room_id + generated_at
room_documents_room_id_scan_id_document_kind_document_type_key Must be unique Asc/Asc/Asc/Asc room_id + scan_id + document_kind + document_type

Check Constraints

Constraint Name Constraint
room_documents_counts_balance ((findings_shown + findings_locked) = findings_total)
room_documents_kind_valid (document_kind = ANY (ARRAY['preview'::text, 'full'::text]))

Relationships