action.ingest_queue_entry

Cascading Deletes: Deleting rows from this table will cascade to: action.ingest_queue.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: ingest_queue_entry_override_by_fkey, ingest_queue_entry_queue_fkey.

Columns

Column Type Nullable Default Notes

id PK

bigint

No

nextval('action.ingest_queue_entry_id_seq'::regclass)

record

bigint

No

record_type

text

No

action

text

No

run_at

timestamp with time zone

No

now()

state_data

text

No

''::text

queue FK

integer

Yes

action.ingest_queue(id)

override_by FK

bigint

Yes

action.ingest_queue_entry(id)

ingest_time

timestamp with time zone

Yes

fail_time

timestamp with time zone

Yes

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

override_by

action.ingest_queue_entry(id)

SET NULL

CASCADE

DEFERRED

ingest_queue_entry_override_by_fkey

queue

action.ingest_queue(id)

CASCADE

CASCADE

DEFERRED

ingest_queue_entry_queue_fkey

Indexes

Index Method Definition

ingest_queue_entry_pkey PK

btree

CREATE UNIQUE INDEX ingest_queue_entry_pkey ON action.ingest_queue_entry USING btree (id)

record_pending_once UNIQUE

btree

CREATE UNIQUE INDEX record_pending_once ON action.ingest_queue_entry USING btree (record_type, record, state_data) WHERE ingest_time IS NULL) AND (override_by IS NULL

entry_override_by_idx

btree

CREATE INDEX entry_override_by_idx ON action.ingest_queue_entry USING btree (override_by) WHERE (override_by IS NOT NULL)

Triggers

Trigger Timing Event Level Function

complete_duplicated_entries_trigger

AFTER

UPDATE

ROW

action.complete_duplicated_entries()

Trigger Bodies

complete_duplicated_entries_trigger

Function: action.complete_duplicated_entries()
Timing: AFTER UPDATE ROW

BEGIN
    IF NEW.ingest_time IS NOT NULL THEN
        UPDATE action.ingest_queue_entry SET ingest_time = NEW.ingest_time WHERE override_by = NEW.id;
    END IF;

    RETURN NULL;
END;

Referenced By

The following tables have foreign keys pointing to action.ingest_queue_entry (1 referencing table(s)):

Table Referencing Column(s) Referenced Column(s) Constraint

action.ingest_queue_entry

override_by

id

ingest_queue_entry_override_by_fkey