Skip to content

uniform_resource_transform

Description

uniform_resource transformed content

Table Definition
CREATE TABLE "uniform_resource_transform" (
"uniform_resource_transform_id" VARCHAR PRIMARY KEY NOT NULL,
"uniform_resource_id" VARCHAR NOT NULL,
"uri" TEXT NOT NULL,
"content_digest" TEXT NOT NULL,
"content" BLOB,
"nature" TEXT,
"size_bytes" INTEGER,
"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", "content_digest", "nature", "size_bytes")
)

Columns

NameTypeDefaultNullableParentsComment
uniform_resource_transform_idVARCHARfalseuniform_resource_transform ULID primary key
uniform_resource_idVARCHARfalseuniform_resourceuniform_resource row ID of original content
uriTEXTfalse
content_digestTEXTfalsetransformed content hash
contentBLOBtruetransformed content
natureTEXTtruefile extension or MIME
size_bytesINTEGERtrue
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
uniform_resource_transform_idPRIMARY KEYPRIMARY KEY (uniform_resource_transform_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_uniform_resource_transform_2UNIQUEUNIQUE (uniform_resource_id, content_digest, nature, size_bytes)
sqlite_autoindex_uniform_resource_transform_1PRIMARY KEYPRIMARY KEY (uniform_resource_transform_id)
-CHECKCHECK(json_valid(elaboration) OR elaboration IS NULL)

Indexes

NameDefinition
idx_uniform_resource_transform__uniform_resource_id__content_digestCREATE INDEX “idx_uniform_resource_transform__uniform_resource_id__content_digest” ON “uniform_resource_transform”(“uniform_resource_id”, “content_digest”)
sqlite_autoindex_uniform_resource_transform_2UNIQUE (uniform_resource_id, content_digest, nature, size_bytes)
sqlite_autoindex_uniform_resource_transform_1PRIMARY KEY (uniform_resource_transform_id)

Relations

er