Skip to content

ur_ingest_session_attachment

Description

uniform_resource transformed content

Table Definition
CREATE TABLE "ur_ingest_session_attachment" (
"ur_ingest_session_attachment_id" VARCHAR PRIMARY KEY NOT NULL,
"uniform_resource_id" VARCHAR,
"name" TEXT,
"uri" TEXT NOT NULL,
"content" BLOB,
"nature" TEXT,
"size" INTEGER,
"checksum" TEXT,
"elaboration" TEXT CHECK(json_valid(elaboration) OR elaboration IS NULL),
"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"),
UNIQUE("uniform_resource_id", "checksum", "nature", "size")
)

Columns

NameTypeDefaultNullableParentsComment
ur_ingest_session_attachment_idVARCHARfalseur_ingest_session_attachment ULID primary key
uniform_resource_idVARCHARtrueuniform_resourceuniform_resource row ID of original content
nameTEXTtrue
uriTEXTfalse
contentBLOBtruetransformed content
natureTEXTtruefile extension or MIME
sizeINTEGERtrue
checksumTEXTtrue
elaborationTEXTtrueanything that doesn’t fit in other columns (JSON)
created_atTIMESTAMPTZCURRENT_TIMESTAMPtrue
created_byTEXT’UNKNOWN’true
updated_atTIMESTAMPTZtrue
updated_byTEXTtrue
deleted_atTIMESTAMPTZtrue
deleted_byTEXTtrue
activity_logTEXTtrue{“isSqlDomainZodDescrMeta”:true ,“isJsonSqlDomain”:true }

Constraints

NameTypeDefinition
ur_ingest_session_attachment_idPRIMARY KEYPRIMARY KEY (ur_ingest_session_attachment_id)
- (Foreign key ID: 0)FOREIGN KEYFOREIGN KEY (uniform_resource_id) REFERENCES uniform_resource (uniform_resource_id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE
sqlite_autoindex_ur_ingest_session_attachment_2UNIQUEUNIQUE (uniform_resource_id, checksum, nature, size)
sqlite_autoindex_ur_ingest_session_attachment_1PRIMARY KEYPRIMARY KEY (ur_ingest_session_attachment_id)
-CHECKCHECK(json_valid(elaboration) OR elaboration IS NULL)

Indexes

NameDefinition
idx_ur_ingest_session_attachment__uniform_resource_id__contentCREATE INDEX “idx_ur_ingest_session_attachment__uniform_resource_id__content” ON “ur_ingest_session_attachment”(“uniform_resource_id”, “content”)
sqlite_autoindex_ur_ingest_session_attachment_2UNIQUE (uniform_resource_id, checksum, nature, size)
sqlite_autoindex_ur_ingest_session_attachment_1PRIMARY KEY (ur_ingest_session_attachment_id)

Relations

er