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 code_notebook_cell_notebook_name_cell_name_interpretable_code_hash_unique
cell_name code_notebook_cell_notebook_name_cell_name_interpretable_code_hash_unique
interpretable_code_hash code_notebook_cell_notebook_name_cell_name_interpretable_code_hash_unique
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,
	`interpretable_code` text NOT NULL,
	`interpretable_code_hash` text NOT NULL,
	`description` text,
	`arguments` text,
	`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`) ON UPDATE no action ON DELETE no action,
	CONSTRAINT "cell_governance_check_valid_json" CHECK(json_valid("code_notebook_cell"."cell_governance") OR "code_notebook_cell"."cell_governance" IS NULL),
	CONSTRAINT "arguments_check_valid_json" CHECK(json_valid("code_notebook_cell"."arguments") OR "code_notebook_cell"."arguments" IS NULL)
)