CREATE TABLE `orchestration_session_state` (
`orchestration_session_state_id` text PRIMARY KEY NOT NULL,
`session_id` text NOT NULL,
`session_entry_id` text,
`from_state` text NOT NULL,
`to_state` text NOT NULL,
`transition_result` text,
`transition_reason` text,
`transitioned_at` TIMESTAMPTZ,
`elaboration` text,
FOREIGN KEY (`session_id`) REFERENCES `orchestration_session`(`orchestration_session_id`) ON UPDATE no action ON DELETE no action,
FOREIGN KEY (`session_entry_id`) REFERENCES `orchestration_session_entry`(`orchestration_session_entry_id`) ON UPDATE no action ON DELETE no action
)