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 |
CURRENT_TIMESTAMP |
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 |
sqlite_autoindex_code_notebook_state_2 |
from_state |
sqlite_autoindex_code_notebook_state_2 |
to_state |
sqlite_autoindex_code_notebook_state_2 |
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 CHECK(json_valid(transition_result) OR transition_result IS NULL),
"transition_reason" TEXT,
"transitioned_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
"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("code_notebook_cell_id") REFERENCES "code_notebook_cell"("code_notebook_cell_id"),
UNIQUE("code_notebook_cell_id", "from_state", "to_state")
)