ur_ingest_session_attachment

Column Type PK Required Default
ur_ingest_session_attachment_id VARCHAR Yes Yes
uniform_resource_id VARCHAR No No
name TEXT No No
uri TEXT No Yes
content BLOB No No
nature TEXT No No
size INTEGER No No
checksum TEXT No No
elaboration TEXT 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
uniform_resource_id uniform_resource_id references uniform_resource.uniform_resource_id

Indexes

Column Name Index Name
uniform_resource_id idx_ur_ingest_session_attachment__uniform_resource_id__content
content idx_ur_ingest_session_attachment__uniform_resource_id__content
uniform_resource_id sqlite_autoindex_ur_ingest_session_attachment_2
checksum sqlite_autoindex_ur_ingest_session_attachment_2
nature sqlite_autoindex_ur_ingest_session_attachment_2
size sqlite_autoindex_ur_ingest_session_attachment_2
ur_ingest_session_attachment_id sqlite_autoindex_ur_ingest_session_attachment_1

SQL DDL

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")
)