ur_ingest_session_udi_pgp_sql
Column |
Type |
PK |
Required |
Default |
ur_ingest_session_udi_pgp_sql_id |
VARCHAR |
Yes |
Yes |
|
sql |
TEXT |
No |
Yes |
|
nature |
TEXT |
No |
Yes |
|
content |
BLOB |
No |
No |
|
behaviour |
TEXT |
No |
No |
|
query_error |
TEXT |
No |
No |
|
uniform_resource_id |
VARCHAR |
No |
No |
|
ingest_session_id |
VARCHAR |
No |
No |
|
created_at |
TIMESTAMPTZ |
No |
No |
CURRENT_TIMESTAMP |
created_by |
TEXT |
No |
No |
'UNKNOWN' |
updated_at |
TIMESTAMPTZ |
No |
No |
|
updated_by |
TEXT |
No |
No |
|
deleted_at |
TIMESTAMPTZ |
No |
No |
|
deleted_by |
TEXT |
No |
No |
|
activity_log |
TEXT |
No |
No |
|
Foreign Keys
Column Name |
Foreign Key |
ingest_session_id |
ingest_session_id references ur_ingest_session.ur_ingest_session_id |
uniform_resource_id |
uniform_resource_id references uniform_resource.uniform_resource_id |
Indexes
Column Name |
Index Name |
ingest_session_id |
idx_ur_ingest_session_udi_pgp_sql__ingest_session_id |
sql |
sqlite_autoindex_ur_ingest_session_udi_pgp_sql_2 |
ingest_session_id |
sqlite_autoindex_ur_ingest_session_udi_pgp_sql_2 |
ur_ingest_session_udi_pgp_sql_id |
sqlite_autoindex_ur_ingest_session_udi_pgp_sql_1 |
SQL DDL
CREATE TABLE "ur_ingest_session_udi_pgp_sql" (
"ur_ingest_session_udi_pgp_sql_id" VARCHAR PRIMARY KEY NOT NULL,
"sql" TEXT NOT NULL,
"nature" TEXT NOT NULL,
"content" BLOB,
"behaviour" TEXT CHECK(json_valid(behaviour) OR behaviour IS NULL),
"query_error" TEXT,
"uniform_resource_id" VARCHAR,
"ingest_session_id" VARCHAR,
"created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
"created_by" TEXT DEFAULT 'UNKNOWN',
"updated_at" TIMESTAMPTZ,
"updated_by" TEXT,
"deleted_at" TIMESTAMPTZ,
"deleted_by" TEXT,
"activity_log" TEXT,
FOREIGN KEY("uniform_resource_id") REFERENCES "uniform_resource"("uniform_resource_id"),
FOREIGN KEY("ingest_session_id") REFERENCES "ur_ingest_session"("ur_ingest_session_id"),
UNIQUE("sql", "ingest_session_id")
)