Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | int8 | 19 | √ | null |
|
|
|||||||||||||||||||||||
config_id | int8 | 19 | null |
|
|
||||||||||||||||||||||||
project_id | int8 | 19 | null |
|
|
||||||||||||||||||||||||
status_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||
start_date | date | 13 | null |
|
|
||||||||||||||||||||||||
end_date | date | 13 | null |
|
|
||||||||||||||||||||||||
internal_comment | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||
feedback | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||
created_by | int8 | 19 | null |
|
|
||||||||||||||||||||||||
created_time | timestamptz | 35,6 | null |
|
|
||||||||||||||||||||||||
modified_by | int8 | 19 | null |
|
|
||||||||||||||||||||||||
modified_time | timestamptz | 35,6 | null |
|
|
||||||||||||||||||||||||
submitted_by | int8 | 19 | √ | null |
|
|
|||||||||||||||||||||||
submitted_time | timestamptz | 35,6 | √ | null |
|
|
|||||||||||||||||||||||
highlights | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||
report_frequency_id | int4 | 10 | null |
|
|
Frequency of the report, that can determine report data. Must match with frequency of the configuration. |
|||||||||||||||||||||||
report_quarter_id | int4 | 10 | √ | null |
|
|
Quarter of the report. Must be non-null for quarterly reports and null otherwise. |
||||||||||||||||||||||
upcoming_notification_sent_time | timestamptz | 35,6 | √ | null |
|
|
|||||||||||||||||||||||
financial_summaries | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||
additional_comments | text | 2147483647 | √ | null |
|
|
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
reports_pkey | Primary key | Asc | id |
reports_end_date_idx | Performance | Asc | end_date |
reports_project_id_idx | Performance | Asc | project_id |
Check Constraints
Constraint Name | Constraint |
---|---|
quarterly_report_has_quarter | (((report_frequency_id = 1) AND (report_quarter_id IS NOT NULL) AND ((report_quarter_id)::numeric = EXTRACT(quarter FROM start_date)) AND ((report_quarter_id)::numeric = EXTRACT(quarter FROM end_date))) OR ((report_frequency_id <> 1) AND (report_quarter_id IS NULL))) |
reports_check | (end_date > start_date) |
submitted_status | (((status_id = 1) AND (submitted_by IS NULL) AND (submitted_time IS NULL)) OR (((status_id = 2) OR (status_id = 3) OR (status_id = 4)) AND (submitted_by IS NOT NULL) AND (submitted_time IS NOT NULL)) OR (status_id = 5)) |