code_notebook_cell

Column Type PK Required Default
code_notebook_cell_id VARCHAR Yes Yes
notebook_kernel_id VARCHAR No Yes
notebook_name TEXT No Yes
cell_name TEXT No Yes
cell_governance TEXT No No
interpretable_code TEXT No Yes
interpretable_code_hash TEXT No Yes
description TEXT No No
arguments 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
notebook_kernel_id notebook_kernel_id references code_notebook_kernel.code_notebook_kernel_id

Indexes

Column Name Index Name
notebook_name sqlite_autoindex_code_notebook_cell_2
cell_name sqlite_autoindex_code_notebook_cell_2
interpretable_code_hash sqlite_autoindex_code_notebook_cell_2
code_notebook_cell_id sqlite_autoindex_code_notebook_cell_1

SQL DDL

CREATE TABLE "code_notebook_cell" (
    "code_notebook_cell_id" VARCHAR PRIMARY KEY NOT NULL,
    "notebook_kernel_id" VARCHAR NOT NULL,
    "notebook_name" TEXT NOT NULL,
    "cell_name" TEXT NOT NULL,
    "cell_governance" TEXT CHECK(json_valid(cell_governance) OR cell_governance IS NULL),
    "interpretable_code" TEXT NOT NULL,
    "interpretable_code_hash" TEXT NOT NULL,
    "description" TEXT,
    "arguments" TEXT CHECK(json_valid(arguments) OR arguments 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("notebook_kernel_id") REFERENCES "code_notebook_kernel"("code_notebook_kernel_id"),
    UNIQUE("notebook_name", "cell_name", "interpretable_code_hash")
)