code_notebook_state
| Column |
Type |
PK |
Required |
Default |
| code_notebook_state_id |
VARCHAR |
Yes |
Yes |
|
| code_notebook_cell_id |
VARCHAR |
No |
Yes |
|
| from_state |
TEXT |
No |
Yes |
|
| to_state |
TEXT |
No |
Yes |
|
| transition_result |
TEXT |
No |
No |
|
| transition_reason |
TEXT |
No |
No |
|
| transitioned_at |
TIMESTAMPTZ |
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 |
| code_notebook_cell_id |
code_notebook_cell_id references code_notebook_cell.code_notebook_cell_id |
Indexes
| Column Name |
Index Name |
| code_notebook_cell_id |
code_notebook_state_code_notebook_cell_id_from_state_to_state_unique |
| from_state |
code_notebook_state_code_notebook_cell_id_from_state_to_state_unique |
| to_state |
code_notebook_state_code_notebook_cell_id_from_state_to_state_unique |
| code_notebook_state_id |
sqlite_autoindex_code_notebook_state_1 |
SQL DDL
CREATE TABLE `code_notebook_state` (
`code_notebook_state_id` VARCHAR PRIMARY KEY NOT NULL,
`code_notebook_cell_id` VARCHAR NOT NULL,
`from_state` text NOT NULL,
`to_state` text NOT NULL,
`transition_result` text,
`transition_reason` text,
`transitioned_at` TIMESTAMPTZ,
`elaboration` 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 (`code_notebook_cell_id`) REFERENCES `code_notebook_cell`(`code_notebook_cell_id`) ON UPDATE no action ON DELETE no action,
CONSTRAINT "transition_result_check_valid_json" CHECK(json_valid("code_notebook_state"."transition_result") OR "code_notebook_state"."transition_result" IS NULL),
CONSTRAINT "elaboration_check_valid_json" CHECK(json_valid("code_notebook_state"."elaboration") OR "code_notebook_state"."elaboration" IS NULL)
)