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