Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | serial | 10 | √ | nextval('reportes_id_seq'::regclass) |
|
|
|||||||||||
| tipo | varchar | 30 | null |
|
|
||||||||||||
| nombre | varchar | 150 | null |
|
|
||||||||||||
| descripcion | text | 2147483647 | √ | null |
|
|
|||||||||||
| estatus | varchar | 15 | 'pendiente'::character varying |
|
|
||||||||||||
| mensaje | text | 2147483647 | √ | null |
|
|
|||||||||||
| version | varchar | 10 | '1'::character varying |
|
|
||||||||||||
| parametros | jsonb | 2147483647 | '{}'::jsonb |
|
|
||||||||||||
| parametros_hash | bytea | 2147483647 | √ | null |
|
|
|||||||||||
| usuario_id | int4 | 10 | √ | null |
|
|
|||||||||||
| reporte_padre_id | int4 | 10 | √ | null |
|
|
|||||||||||
| tiempo_inicio | timestamptz | 35,6 | √ | null |
|
|
|||||||||||
| tiempo_fin | timestamptz | 35,6 | √ | null |
|
|
|||||||||||
| tiempo_creado | timestamptz | 35,6 | √ | CURRENT_TIMESTAMP |
|
|
|||||||||||
| tiempo_actualizado | timestamptz | 35,6 | √ | CURRENT_TIMESTAMP |
|
|
|||||||||||
| tiempo_eliminado | timestamptz | 35,6 | √ | null |
|
|
|||||||||||
| fecha_desde | date | 13 | √ | null |
|
|
|||||||||||
| fecha_hasta | date | 13 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| reportes_pkey | Primary key | Asc | id |
| ix_reportes__padre | Performance | Asc | reporte_padre_id |
| ix_reportes__parametros_hash | Performance | Asc/Asc | tipo + parametros_hash |
| ix_reportes__pendientes | Performance | Asc/Asc | estatus + tiempo_creado |
| ix_reportes__rango_fechas | Performance | Asc/Asc | fecha_desde + fecha_hasta |
| ix_reportes__recientes | Performance | Desc | tiempo_creado |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| ck_reportes__rango_ordenado | (((fecha_desde IS NULL) OR (fecha_desde <= fecha_hasta))) |
| ck_reportes__padre_distinto | ((reporte_padre_id IS DISTINCT FROM id)) |
| reportes_tipo_check | (((tipo)::text = 'propiedades'::text)) |
| ck_reportes__rango_completo | (((fecha_desde IS NULL) = (fecha_hasta IS NULL))) |
| reportes_estatus_check | (((estatus)::text = ANY ((ARRAY['pendiente'::character varying, 'procesando'::character varying, 'completado'::character varying, 'fallado'::character varying])::text[]))) |

